/* Complementos sobre erp-base.css (diseño portado del ERP de Mariam). */

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }
.mt { margin-top: 16px; }
.hide { display: none !important; }

/* Logo del sidebar */
.logo { padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.logo img { width: 130px; display: block; }
.logo .sub { color: rgba(255,255,255,.4); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; margin-top: 6px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--accent); }
.login-card { background: var(--surface); border-radius: 14px; padding: 34px 30px; width: 340px; max-width: 92vw; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-card img { width: 150px; display: block; margin: 0 auto 20px; }
.login-card h1 { font-size: 16px; text-align: center; margin: 0 0 18px; color: var(--text); }
.login-card .field { margin-bottom: 14px; }
.login-card .err { color: var(--danger); font-size: 12px; margin-top: 10px; min-height: 16px; text-align: center; }

/* Pills de estado de compra/mapeo */
.pill { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 2px 8px; letter-spacing: .5px; }
.pill-ok { background: #e6f4ec; color: #1e7a47; }
.pill-warn { background: #fbeee0; color: #b5651d; }
.pill-no { background: #f7e3e0; color: #a93226; }

/* Zona de captura */
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 28px; text-align: center; cursor: pointer; transition: all .15s; background: var(--surface); }
.dropzone:hover { border-color: var(--accent2); background: var(--surface2); }
.preview-foto { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }

/* Toast */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 11px 20px; border-radius: 8px; font-size: 13px; z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); }

/* Banner de actualización del SW */
#sw-update-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--accent2); color: #fff; padding: 10px 16px; font-size: 13px; text-align: center; z-index: 300; }
#sw-update-banner button { margin-left: 10px; background: #fff; color: var(--accent2); border: none; border-radius: 6px; padding: 5px 12px; font-weight: 700; cursor: pointer; }

@media (max-width: 720px) {
  .sidebar { position: fixed; z-index: 50; width: 200px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; }
