/* Capa de la aplicación sobre prototype.css: navegación con enlaces, login, errores, validaciones y estados. */

/* ---------- Navegación: los .nav del prototipo eran <button>; aquí son <a> ---------- */
a.nav { text-decoration: none; }
a.nav:focus-visible, .btn:focus-visible, .mini:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.userbox form { margin: 0; }
.userbox .mini { cursor: pointer; }
.usertxt a { color: inherit; text-decoration: none; }
.usertxt a:hover b { text-decoration: underline; }

/* ---------- Notificaciones (campana) ---------- */
.notif-chip { cursor: pointer; gap: 5px; }
.notif-chip:hover { box-shadow: 0 7px 16px rgba(10, 28, 45, .10); }
.notif-count { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 8.5px; font-weight: 900; }
.notif-list { display: grid; gap: 7px; }
.notif-item { display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; text-decoration: none; color: var(--text); background: #fff; }
.notif-item:hover { box-shadow: var(--shadow); }
.notif-item.unread { border-left: 4px solid var(--amber); background: #fffdf6; }
.notif-item .badge { grid-row: span 3; align-self: start; }
.notif-item b { font-size: 10.4px; }
.notif-item small { grid-column: 2; color: var(--muted); font-size: 9px; line-height: 1.4; }
.notif-item em { grid-column: 2; font-style: normal; font-size: 8.5px; color: var(--muted); }

/* ---------- Toast de error ---------- */
.toast.error { background: var(--red); }

/* ---------- Modal ---------- */
.modal.modal-wide { width: min(1180px, 100%); }
.confirm-text { font-size: 11.5px; line-height: 1.55; margin: 0 0 8px; }
.btn[disabled], .mini[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Formularios ---------- */
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fff8f8; }
.field-error { color: var(--red); font-size: 8.6px; font-weight: 700; }
.field .hint { font-size: 8.4px; color: var(--muted); }
.ocr-review { background: #fff7df; border-radius: 6px; }
.ocr-review input { border-color: var(--amber); }
.required:after { content: " *"; color: var(--red); }

/* ---------- Estados vacíos ---------- */
.empty-state { text-align: center; padding: 26px 12px; color: var(--muted); font-size: 10px; }
.empty-state b { display: block; color: var(--text); font-size: 11.5px; margin-bottom: 4px; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; margin: 0; background: var(--navy); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.login-visual {
  position: relative; overflow: hidden; color: #fff; padding: 42px 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(120deg, rgba(5, 25, 42, .96) 0%, rgba(6, 34, 57, .82) 48%, rgba(5, 27, 47, .55) 100%),
    url("../img/hero-dashboard.png") center center / cover no-repeat;
}
.login-visual img { width: min(360px, 80%); }
.login-visual .claim { font-weight: 900; font-size: 26px; line-height: 1.12; letter-spacing: .3px; }
.login-visual .claim span { display: block; }
.login-visual .claim span:nth-child(2) { color: var(--lime); }
.login-visual p { color: #c6d0d9; font-size: 12px; max-width: 520px; line-height: 1.6; margin: 14px 0 0; }
.login-panel { background: var(--bg); display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; box-shadow: var(--shadow2); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; color: var(--navy2); }
.login-card .sub { margin-bottom: 18px; }
.login-card .field { margin-bottom: 12px; }
.login-card input[type=email], .login-card input[type=password] { height: 38px; font-size: 11px; }
.login-card .btn { width: 100%; height: 40px; font-size: 11px; }
.login-check { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); margin: 4px 0 16px; }
.login-errors { border: 1px solid #efc9c9; background: #fff8f8; color: #a22e2e; border-radius: 9px; padding: 9px 11px; font-size: 10px; margin-bottom: 12px; }
.login-errors ul { margin: 0; padding-left: 16px; }
.login-errors:empty, .login-errors.validation-summary-valid { display: none; }
.login-foot { margin-top: 16px; font-size: 8.8px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 220px; padding: 26px 22px; }
  .login-visual .claim { font-size: 20px; }
}

/* ---------- Páginas de error / acceso denegado ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 20px; }
.error-card { width: min(520px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); text-align: center; }
.error-card .code { font-size: 42px; font-weight: 950; color: var(--navy2); }
.error-card p { font-size: 11px; color: var(--muted); line-height: 1.6; }
.error-card small { display: block; font-size: 9px; color: var(--muted); margin-top: 8px; }

/* ---------- Utilidades ---------- */
.muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.link-btn { border: 0; background: none; color: var(--blue); font-weight: 800; padding: 0; cursor: pointer; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
