/* CRM Global México · additions on top of the CRM GLOBAL primitives (app.css). */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field .req { color: var(--accent); margin-left: 3px; }
.field .ro { font-size: 13px; color: var(--ink-2); padding: 10px 0; }
.field-help { font-size: 11px; color: var(--muted-2); text-transform: none; letter-spacing: 0; font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 8px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.multi { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 18px; }
.facts .k { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.facts .v { font-size: 13px; font-weight: 600; color: var(--ink); white-space: pre-line; word-break: break-word; }
.facts .v.empty { color: var(--muted-2); font-weight: 500; }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist .item { display: grid; grid-template-columns: 22px 28px 1fr auto; gap: 8px; align-items: start; font-size: 12.5px; }
.checklist .tick { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.checklist .tick.ok { background: var(--green-bg); color: var(--green); }
.checklist .tick.miss { background: var(--red-bg); color: var(--red); }
.checklist .num { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.stage-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted-2); }
.alarm { color: var(--red); font-weight: 700; }

.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(28,25,23,.12); z-index: 30; max-height: 340px; overflow-y: auto; }
.suggest-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; background: none; border: none; font-size: 12.5px; cursor: pointer; }
.suggest-list button:hover { background: var(--surface-2); }

@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } .topbar { flex-wrap: wrap; } }

/* Home: visit mix grid and weekly priorities */
.mix-grid { display: grid; grid-template-columns: 110px repeat(4, minmax(0, 1fr)); gap: 8px; }
.mix-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); text-align: center; }
.mix-play { font-size: 12.5px; font-weight: 700; color: var(--ink-2); align-self: center; }
.mix-cell { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.mix-cell strong { font-size: 18px; }
.mix-cell.empty { background: var(--surface-2); align-items: center; justify-content: center; }
.prio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.prio-col { display: flex; flex-direction: column; gap: 4px; border-top: 3px solid var(--line); padding-top: 8px; min-width: 0; }
.prio-blue { border-top-color: var(--blue); } .prio-red { border-top-color: var(--red); } .prio-amber { border-top-color: var(--amber); } .prio-green { border-top-color: var(--green); }
.prio-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 4px; }
.prio-item { display: flex; flex-direction: column; gap: 1px; padding: 7px 0; border-bottom: 1px solid var(--surface-3); color: inherit; text-decoration: none; }
.prio-item:hover .strong { color: var(--accent); }
@media (max-width: 1100px) { .prio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mix-grid { grid-template-columns: 80px repeat(4, minmax(0, 1fr)); } }

/* School page: key people chips and the 360 timeline */
.chips-inline { display: flex; flex-wrap: wrap; gap: 4px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 96px 14px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--surface-3); align-items: start; }
.tl-date { display: flex; flex-direction: column; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--muted-2); }
.tl-dot.tone-blue { background: var(--blue); } .tl-dot.tone-accent { background: var(--accent); } .tl-dot.tone-amber { background: var(--amber); } .tl-dot.tone-green { background: var(--green); }

/* Samples tracking (Logística) */
.sample-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.sample-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; }
.sample-card strong { font-size: 22px; }
.sample-card.active { box-shadow: 0 0 0 2px var(--accent); }
.sample-card.tone-blue { border-top-color: var(--blue); } .sample-card.tone-amber { border-top-color: var(--amber); } .sample-card.tone-green { border-top-color: var(--green); } .sample-card.tone-red { border-top-color: var(--red); }
.sample-row > summary { list-style: none; cursor: pointer; }
.sample-row > summary::-webkit-details-marker { display: none; }
.sample-lines { padding: 6px 16px 12px 28px; border-bottom: 1px solid var(--surface-3); background: var(--surface-2); }
.steps { display: flex; gap: 3px; flex-wrap: wrap; }
.step { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: var(--surface-3); color: var(--muted); }
.step.st-hecho { background: var(--green-bg); color: var(--green); }
.step.st-actual { background: var(--blue-bg); color: var(--blue); }
.step.st-parcial { background: var(--amber-bg); color: var(--brown); }
.step.st-cancelado { background: var(--red-bg); color: var(--red); text-decoration: line-through; }

/* Feedback: toast after saving, errors next to the field. */
.toast-wrap { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 18px); right: 24px; z-index: 80; max-width: min(460px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: 30px 1fr 24px; gap: 12px; align-items: start; padding: 14px 14px 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(28,25,23,.18); border-left: 5px solid var(--green); }
.toast.danger { border-left-color: var(--red); }
.toast-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--green-bg); color: var(--green); }
.toast.danger .toast-ico { background: var(--red-bg); color: var(--red); }
.toast-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.toast-text strong { font-size: 14px; color: var(--ink); }
.toast-x { background: none; border: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.tbl-title { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-3, var(--line)); font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.field-error { display: block; font-size: 12px; font-weight: 600; color: var(--red); text-transform: none; letter-spacing: 0; }
.form-alert { font-size: 13.5px; border-left: 4px solid var(--red); }

/* Record pages: the school name in the title is the way back to the school. */
.title-link { color: inherit; text-decoration: none; }
.title-link span { color: var(--muted-2); font-weight: 500; }
.title-link:hover, .title-link:focus-visible { color: var(--accent); }
.title-link:hover span { color: var(--accent); }

/* app.css (CRM GLOBAL) turns every image inside .auth-art into the full-panel background; our login also has the
   SM logo in that panel, which must stay a normal inline image. */
.auth-art .inner img { position: static; width: auto; height: 16px; inset: auto; object-fit: contain; }
/* Multi-select in search results: tick several and add them together. */
.suggest-check { display: flex; gap: 8px; align-items: flex-start; padding: 7px 12px; font-size: 12.5px; cursor: pointer; }
.suggest-check:hover { background: var(--surface-2); }
.suggest-actions { position: sticky; bottom: 0; display: flex; gap: 6px; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.suggest-actions button { width: auto !important; display: inline-flex !important; }
