/* Estilos compartidos del formulario público y del back office. */
:root {
  --ink: #15171a;
  --ink-2: #4a4f57;
  --line: #d9dce1;
  --paper: #ffffff;
  --bg: #f4f4f2;
  --accent: #d9480f;
  --accent-ink: #ffffff;
  --ok: #2b8a3e;
  --warn: #b35c00;
  --bad: #c92a2a;
  --soft: #fff4ec;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.wide { max-width: 1280px; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); font-size: .92rem; }
.small { font-size: .85rem; }

.top { background: var(--ink); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.top .brand { font-weight: 700; letter-spacing: .02em; }
.top .brand small { display: block; font-weight: 400; opacity: .75; font-size: .8rem; }
.top .spacer { flex: 1; }
.top button { background: transparent; color: #fff; border: 1px solid #ffffff55; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.hero { border-left: 4px solid var(--accent); }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.facts li { padding-left: 1.4em; position: relative; }
.facts li::before { content: "●"; color: var(--accent); position: absolute; left: 0; font-size: .7em; top: .35em; }

label { display: block; font-weight: 600; margin: 14px 0 4px; }
label .opt { font-weight: 400; color: var(--ink-2); }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=time], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #d9480f55; outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row label { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 4px 0; }
.help { font-size: .85rem; color: var(--ink-2); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin: 18px 0 2px; padding: 0; }

button, .btn {
  font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; text-decoration: none; display: inline-block;
}
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
button.big { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 18px; }
button:disabled { opacity: .55; cursor: default; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button.danger { color: var(--bad); border-color: #c92a2a55; }

.error { background: #fff0f0; border: 1px solid #c92a2a55; color: var(--bad); padding: 10px 12px; border-radius: 8px; margin-top: 12px; }
.ok-box { background: #ebfbee; border: 1px solid #2b8a3e55; padding: 12px; border-radius: 8px; }
.notice { background: var(--soft); border: 1px solid #d9480f33; padding: 10px 12px; border-radius: 8px; }

/* Back office */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 10px 12px; }
.tabs button.active { border-bottom-color: var(--accent); font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #fafafa; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td select, td input { padding: 4px 6px; width: auto; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .8rem; font-weight: 600; background: #eee; white-space: nowrap; }
.pill.nueva { background: #fff4e6; color: #a34700; }
.pill.contactada { background: #e7f5ff; color: #1c5d99; }
.pill.asignada { background: #ebfbee; color: #2b6a33; }
.pill.baja { background: #f1f3f5; color: #666; }
.pill.dup { background: #fff0f0; color: var(--bad); }
.m-presente { color: var(--ok); font-weight: 700; }
.m-ausente { color: var(--bad); font-weight: 700; }
.m-justificada { color: var(--warn); font-weight: 700; }
.grid-cycles { display: grid; gap: 16px; }
.turno { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 10px; }
.dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.date-chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px 2px 10px; font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.date-chip.cancelled { text-decoration: line-through; opacity: .6; }
.date-chip button { padding: 0 6px; border: 0; font-size: .85rem; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form label { margin: 0; font-weight: 600; font-size: .85rem; }
.inline-form input, .inline-form select { width: auto; }
.detail { background: #fcfcfb; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; font-size: .9rem; }
@media (max-width: 700px) { .kv { grid-template-columns: 1fr; } }
.login-card { max-width: 420px; margin: 40px auto; }
@media (max-width: 640px) {
  .top .wrap { flex-wrap: wrap; }
  .top #who { display: none; }
  .tabs button { padding: 8px; }
}
