/* Estilos comunes del panel del negocio (Hoy, Seguimiento, Configuración). */
:root {
  --azul: #1a56db; --azul-claro: #e8efff; --verde: #067647; --verde-claro: #e7f6ec;
  --rojo: #b42318; --rojo-claro: #fee4e2; --ambar: #b54708; --ambar-claro: #fff4e5;
  --texto: #1a1a1a; --suave: #5b6170; --borde: #e3e5ea; --fondo: #f4f5f7;
}
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; background: var(--fondo); color: var(--texto); line-height: 1.4; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 10px 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
.lead { color: var(--suave); margin: 0 0 18px; font-size: 0.98rem; }
a { color: var(--azul); }
.panel { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
label { display: block; font-weight: 600; margin-top: 10px; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], input[type=file], select {
  width: 100%; box-sizing: border-box; padding: 9px 10px; margin-top: 4px; border: 1px solid #cfd3da; border-radius: 8px; font-size: 0.95rem; background: #fff; font-family: inherit; }
input:focus, select:focus { outline: 2px solid var(--azul-claro); border-color: var(--azul); }
button { margin-top: 12px; padding: 10px 18px; background: var(--azul); color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.95rem; font-family: inherit; }
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { background: #a3a8b3; cursor: default; }
button.secondary { background: #fff; color: var(--texto); border: 1px solid #cfd3da; }
button.danger, button.red { background: var(--rojo); }
button.green { background: var(--verde); }
button.big { font-size: 1.05rem; padding: 13px 26px; }
button.small { margin: 0; padding: 5px 11px; font-size: 0.82rem; }
button.link { background: none; color: var(--azul); padding: 0; margin: 0; font-weight: 600; text-decoration: underline; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
th { color: var(--suave); font-weight: 600; font-size: 0.82rem; }
.table-wrap { overflow-x: auto; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row > * { flex: 1 1 160px; }
.muted { color: var(--suave); font-size: 0.85rem; }
.error { color: var(--rojo); margin-top: 8px; font-weight: 600; }
.error:empty { display: none; }
.ok { color: var(--verde); font-weight: 600; }
.warn { background: var(--ambar-claro); border: 1px solid #f5b046; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.notice { border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 0.93rem; }
.notice.good { background: var(--verde-claro); color: #05603a; }
.notice.bad { background: var(--rojo-claro); color: #912018; }
.notice.info { background: var(--azul-claro); color: #1e3a8a; }
.notice.wait { background: var(--ambar-claro); color: #93370d; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
details > summary { cursor: pointer; user-select: none; }

/* barra superior */
.topbar { background: var(--azul); color: #fff; }
.topbar .inner { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.topbar .brand { font-weight: 700; font-size: 1.05rem; }
.topbar .brand small { font-weight: 400; opacity: .85; margin-left: 6px; font-size: 0.85rem; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { color: #fff; text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 0.95rem; white-space: nowrap; }
.topbar nav a.active { background: #0f3a9e; font-weight: 600; }
.topbar nav a:hover { background: #1747b8; }
.topbar .user { font-size: 0.85rem; opacity: .95; display: flex; align-items: center; }
.topbar .user button { margin: 0 0 0 8px; padding: 5px 11px; font-size: 0.82rem; background: #0f3a9e; color: #fff; border: 1px solid rgba(255,255,255,.5); }
@media (max-width: 640px) {
  .topbar .inner { padding: 8px 12px; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .topbar nav a { flex: 1; text-align: center; padding: 8px 4px; font-size: 0.9rem; }
  .topbar .user { margin-left: auto; }
  .topbar .user .who { display: none; }
  main { padding: 12px; }
  .panel { padding: 14px; }
}

/* login */
.login { max-width: 380px; margin: 60px auto; }
.login button { width: 100%; }

/* foco visible para quien usa teclado */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #f5b046; outline-offset: 2px; }
.topbar a:focus-visible, .topbar button:focus-visible { outline-color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pw-wrap { display: flex; gap: 6px; align-items: center; }
.pw-wrap input { flex: 1; }
.pw-wrap button, .login .pw-wrap button { margin-top: 4px; width: auto; flex: none; }

/* avisos cortos */
#toastBox { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 0.93rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); animation: toastIn .2s ease; max-width: 90vw; }
.toast.good::before { content: '✓ '; color: #6ee7b7; font-weight: 700; }
.toast.bad { background: var(--rojo); }
.toast.out { opacity: 0; transition: opacity .4s; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
