/* path: /files/public_html/app-bio/assets/portal.css */
/* 0.9.30 Archivo creado: estilo iOS del portal Biosafras (portado de css/portal-ios.css del plugin, sin los arreglos para Elementor) */

:root {
  --verde: #7ea842;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-color: #0f172a;
  --muted: #64748b;
  --border-color: #e2e8f0;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --rojo: #ef4444;
}
html.oscuro {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.92);
  --text-color: #f8fafc;
  --muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --topbar-bg: rgba(15, 23, 42, 0.88);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-main); color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }

.bio-staging {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 1000000;
  background: #f5a828; color: #1a1205; font-size: 0.7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.15); pointer-events: none;
}

.bio-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--verde); color: #fff; border: 0; border-radius: 12px;
  padding: 11px 18px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.bio-btn:disabled { opacity: .6; cursor: wait; }

/* Login */
.bio-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.bio-login-card {
  width: 100%; max-width: 380px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 22px; padding: 28px 24px; box-shadow: 0 15px 35px rgba(0,0,0,0.06); display: grid; gap: 12px;
}
.bio-login-logo { width: 120px; margin: 0 auto 4px; display: block; }
.bio-login-card h1 { margin: 0; font-size: 1.3rem; text-align: center; }
.bio-login-card p { margin: 0 0 6px; color: var(--muted); font-size: 0.85rem; text-align: center; }
.bio-login-card label { display: grid; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.bio-login-card input {
  font: inherit; font-size: 1rem; color: var(--text-color); background: var(--bg-main);
  border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px; outline: none;
}
.bio-login-card input:focus { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(126,168,66,.2); }
.bio-error { color: var(--rojo); font-size: 0.82rem; min-height: 1em; }

/* Portal */
.ios-wrapper {
  min-height: 100vh; padding-bottom: 50px;
  background: var(--bg-main) url("logo.png") no-repeat center 40% / 500px fixed;
}
.ios-wrapper::before { content: ""; position: fixed; inset: 0; background: var(--bg-main); opacity: .9; pointer-events: none; }
.ios-wrapper > * { position: relative; }

.ios-top-bar {
  position: sticky; top: 0; z-index: 9999;
  background: var(--topbar-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color); padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.ios-profile-trigger { display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.ios-avatar {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--verde);
  display: grid; place-items: center; background: rgba(126,168,66,.15); color: var(--verde); font-weight: 800;
}
.ios-user-text { display: flex; flex-direction: column; line-height: 1.15; }
.ios-user-greeting { font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.ios-user-name { font-size: 0.88rem; font-weight: 700; }

.ios-actions-right { display: flex; align-items: center; gap: 10px; }
.ios-icon-btn {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,0.04); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: pointer;
}
html.oscuro .ios-icon-btn { background: rgba(255,255,255,0.06); }

.ios-profile-dropdown {
  display: none; position: absolute; top: 52px; left: 0; width: 230px;
  background: var(--bg-card); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  padding: 8px 0; z-index: 10000;
}
.ios-profile-dropdown.active { display: block; }
.ios-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text-color); text-decoration: none; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.ios-dropdown-item:hover { background: rgba(126,168,66,.08); }
.ios-dropdown-item.salir, .ios-dropdown-item.salir i { color: var(--rojo); }
.ios-dropdown-divider { height: 1px; background: var(--border-color); margin: 6px 0; }

.ios-container { max-width: 1000px; margin: 0 auto; padding: 10px 16px; }
.ios-welcome-box {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 18px; padding: 20px; margin: 6px 0 12px;
  backdrop-filter: blur(10px); box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.ios-welcome-box h2 { margin: 0 0 4px; font-size: 1.3rem; }
.ios-welcome-box p { margin: 0 0 14px; font-size: 0.82rem; opacity: .7; }

.ios-section-title { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; margin: 20px 0 10px 4px; }
.ios-apps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .ios-apps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
.ios-app-item {
  position: relative; background: var(--bg-card); border: 1px solid var(--border-color); backdrop-filter: blur(8px);
  border-radius: 18px; padding: 14px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03); transition: transform .12s;
}
.ios-app-item:active { transform: scale(.96); }
.ios-app-icon {
  --c: var(--verde);
  width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent);
}
.ios-app-item > span:last-of-type { font-size: 0.75rem; font-weight: 600; line-height: 1.1; }
.bio-pend { position: absolute; top: 4px; right: 9px; color: #f5a828; font-size: 1.2rem; line-height: 1; }

.bs-theme-toggle-bar {
  display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; font-weight: 700;
  background: var(--bg-card); border: 1px solid var(--border-color); padding: 12px 18px; border-radius: 16px; margin-top: 25px;
}
.ios-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.ios-switch input { opacity: 0; width: 0; height: 0; }
.ios-slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; transition: .3s; border-radius: 34px; }
.ios-slider::before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.ios-switch input:checked + .ios-slider { background: var(--verde); }
.ios-switch input:checked + .ios-slider::before { transform: translateX(22px); }

/* Vista de módulo a pantalla completa */
.ios-spa-view { display: none; background: var(--bg-main); position: fixed; inset: 0; z-index: 999999; overflow-y: auto; }
.ios-spa-view.active { display: block; }
.ios-spa-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--bg-card); border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 9000; backdrop-filter: blur(20px);
}
.ios-spa-header strong { font-size: 0.95rem; text-align: center; }
.ios-back-btn {
  background: rgba(0,0,0,0.06); border: none; color: var(--verde); padding: 8px 14px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
#ios-spa-body { padding: 12px 16px; max-width: 1100px; margin: 0 auto; }
.bio-aviso {
  max-width: 460px; margin: 40px auto; text-align: center; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 18px; padding: 28px 22px; color: var(--muted); font-size: 0.88rem;
}
.bio-aviso h3 { color: var(--text-color); margin: 10px 0 6px; }
.bio-aviso a { color: var(--verde); font-weight: 700; }
.bio-cargando { text-align: center; padding: 50px; color: var(--muted); }

/* 0.9.30 Fase 2: piezas compartidas de los módulos (documentos, perfil, catálogos) */
.ios-avatar { overflow: hidden; }
.ios-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bm { max-width: 900px; margin: 0 auto; }
.bm-ancho { max-width: 1000px; }
.bm-caja { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 12px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.bm-fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bm-buscar { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 10px; padding: 0 12px; height: 40px; }
.bm-buscar i { color: var(--muted); }
.bm-buscar input { border: 0; outline: 0; background: transparent; width: 100%; font: inherit; font-size: 0.88rem; color: var(--text-color); }
.bm-input, .bm-select {
  font: inherit; font-size: 0.85rem; color: var(--text-color); background: var(--bg-main);
  border: 1px solid var(--border-color); border-radius: 10px; padding: 9px 12px; outline: none; width: 100%;
}
.bm-input:focus, .bm-select:focus, .bm-buscar:focus-within { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(126,168,66,.18); }
.bm-fila .bm-select { width: auto; min-width: 150px; height: 40px; }
.bm-btn-sec {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  background: rgba(126,168,66,0.1); color: var(--verde); border: 1px solid rgba(126,168,66,0.3); font-weight: 700; font-size: 0.8rem; white-space: nowrap;
}
.bm-btn-sec.activo { background: var(--verde); color: #fff; }
.bm-fechas { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.bm-fechas.abierto { display: grid; }
.bm-lbl { display: grid; gap: 4px; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.bm-info { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; margin: 0 0 10px 2px; display: flex; gap: 6px; align-items: center; }
.bm-vacio { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 0.88rem; }

/* Documentos */
.bm-doc { display: block; width: 100%; text-align: left; background: var(--bg-card); border: 1px solid var(--border-color); border-left: 4px solid var(--verde); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.bm-doc:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.bm-doc-top, .bm-doc-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bm-doc-num { font-weight: 800; font-size: 0.9rem; }
.bm-doc-fecha { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.bm-doc-concepto { font-size: 0.84rem; color: var(--muted); margin: 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-doc-pie { border-top: 1px dashed var(--border-color); padding-top: 8px; }
.bm-monto { font-weight: 800; color: var(--verde); }
.bm-arch { display: inline-flex; align-items: center; gap: 4px; background: var(--verde); color: #fff; padding: 5px 10px; border-radius: 7px; font-size: 0.72rem; font-weight: 700; text-decoration: none; }
.bm-arch.no { background: rgba(0,0,0,0.06); color: var(--muted); }
html.oscuro .bm-arch.no { background: rgba(255,255,255,0.06); }
.bm-pag { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.bm-pag button { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.bm-pag button:disabled { opacity: .35; cursor: default; }

/* Modal */
.bm-modal { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.55); align-items: center; justify-content: center; padding: 16px; }
.bm-modal.abierto { display: flex; }
.bm-modal-card { position: relative; background: var(--bg-card); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 18px; padding: 20px; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
html.oscuro .bm-modal-card { background: #1e293b; }
.bm-modal-cerrar { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.bm-modal h4 { margin: 0 0 14px; color: var(--verde); }
.bm-dato { font-size: 0.72rem; color: var(--muted); }
.bm-dato strong { display: block; font-size: 0.92rem; color: var(--text-color); margin-top: 2px; }
.bm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px; margin: 10px 0; }
.bm-texto { background: var(--bg-main); border-left: 3px solid var(--verde); border-radius: 8px; padding: 10px 12px; font-size: 0.85rem; line-height: 1.45; margin: 8px 0; }

/* Perfil */
.bm-perfil { max-width: 650px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 18px; overflow: hidden; }
.bm-portada { height: 130px; background: #0f172a url("logo.png") no-repeat center / auto 70%; }
.bm-portada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-perfil-cab { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px 12px; margin-top: -40px; }
.bm-perfil-av { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--bg-card); background: #e8f0dc; color: var(--verde); display: grid; place-items: center; font-size: 2rem; font-weight: 800; overflow: hidden; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
html.oscuro .bm-perfil-av { border-color: #1e293b; background: #2b3a22; }
.bm-perfil-av img { width: 100%; height: 100%; object-fit: cover; }
.bm-perfil-cab h3 { margin: 0; color: var(--verde); font-size: 1.1rem; }
.bm-perfil-cab span { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.bm-tabs { display: flex; gap: 4px; padding: 6px 12px; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); overflow-x: auto; background: rgba(0,0,0,0.02); }
.bm-tab { background: transparent; border: 0; padding: 7px 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.bm-tab.activo { background: var(--verde); color: #fff; }
.bm-panel { display: none; padding: 14px 16px; }
.bm-panel.activo { display: block; }
.bm-tabla { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.bm-tabla td { padding: 9px 4px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.bm-tabla tr:last-child td { border-bottom: 0; }
.bm-tabla td:first-child { width: 34%; font-weight: 700; color: var(--muted); }
.bm-tabla a { color: var(--verde); text-decoration: none; }
.bm-chip { display: inline-block; background: rgba(126,168,66,0.15); color: var(--verde); padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.72rem; }
.bm-form { display: grid; gap: 10px; }
.bm-form .bio-btn { width: 100%; }
.bm-form h4 { margin: 6px 0 0; color: var(--verde); font-size: 0.9rem; }
.bm-check { display: flex; justify-content: space-between; align-items: center; font-size: 0.84rem; font-weight: 700; }
.bm-check input { width: 18px; height: 18px; accent-color: var(--verde); }
.bm-msg:empty { display: none; }
.bm-msg { font-size: 0.8rem; font-weight: 700; border-radius: 8px; padding: 8px 10px; color: #fff; background: var(--verde); }
.bm-msg.error { background: var(--rojo); }
.bm-nota { font-size: 0.78rem; color: var(--muted); margin: 0; }
.bm-sep { border: 0; border-top: 1px solid var(--border-color); margin: 8px 0; }

/* Catálogos */
.bm-prod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 768px) { .bm-prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.bm-prod { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bm-prod:hover { border-color: var(--verde); }
.bm-prod-img { height: 140px; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--verde); font-size: 2.6rem; }
html.oscuro .bm-prod-img { background: rgba(255,255,255,0.92); }
.bm-prod-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bm-prod h4 { margin: 0; font-size: 0.84rem; line-height: 1.2; }
.bm-prod p { margin: 0; font-size: 0.72rem; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bm-ficha-cab { display: flex; gap: 14px; align-items: center; padding-right: 20px; }
.bm-ficha-cab .bm-prod-img { width: 110px; height: 110px; flex-shrink: 0; border: 1px solid var(--border-color); }
.bm-ficha-cab h3 { margin: 4px 0; font-size: 1.05rem; }
.bm-wa { display: flex; align-items: center; justify-content: center; gap: 8px; background: #25d366; color: #fff; text-decoration: none; height: 44px; border-radius: 10px; font-weight: 700; margin-top: 12px; font-size: 0.9rem; }
.bm-wa.apagado { background: #94a3b8; pointer-events: none; }
[hidden] { display: none !important; } /* 0.9.30 fase 2: el atributo hidden gana sobre los display de los módulos */
.bm-prod .bm-chip { align-self: flex-start; } /* 0.9.30 fase 2: la etiqueta de categoría no se estira */

/* 0.9.30 Fase 3: módulos del colaborador (foro, chats, eventos, archivos e historias) */
.bm-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: #e8f0dc; color: var(--verde); font-weight: 800; }
html.oscuro .bm-av { background: #2b3a22; }
.bm-av img { width: 100%; height: 100%; object-fit: cover; }
.bm-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; min-width: 0; }
.bm-item:hover { border-color: var(--verde); }
.bm-item.plano { border: 0; border-bottom: 1px solid var(--border-color); border-radius: 0; margin: 0; background: transparent; }
.bm-item.estatico { cursor: default; }
.bm-item.estatico:hover { border-color: var(--border-color); }
.bm-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bm-item-txt strong { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-item-txt small { font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-item-flecha { color: var(--muted); font-size: 0.8rem; }
.bm-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--muted); }
.bm-contador { background: var(--verde); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 0.7rem; display: inline-grid; place-items: center; }
.bio-insignia { position: absolute; top: 6px; right: 8px; background: var(--rojo); }
.bm-estado { background: rgba(34,197,94,0.15); color: #16a34a; font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; }
.bm-estado.cerrado { background: rgba(239,68,68,0.13); color: var(--rojo); }
.bm-btn-mini { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 1px solid var(--border-color); color: var(--text-color); padding: 5px 10px; border-radius: 8px; font-size: 0.74rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.bm-btn-mini.rojo { color: var(--rojo); border-color: rgba(239,68,68,0.35); }
.bm-btn-mini.fav, .bm-btn-mini.fav i { color: var(--rojo); }
.bm-btn-sec.activo { background: var(--verde); color: #fff; }
.bm-tabs-sueltas { border: 0; background: transparent; padding: 0; margin-top: 10px; }
.bm-tema-tit { margin: 0; font-size: 1.02rem; color: #0284c7; line-height: 1.3; word-break: break-word; }
.bm-post { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.bm-post.principal { border-left: 3px solid #0284c7; }
.bm-post-cab { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; margin-bottom: 6px; }
.bm-post-cab .bm-av { width: 28px; height: 28px; font-size: 0.8rem; }
.bm-post-cab span:last-child { color: var(--muted); margin-left: auto; font-size: 0.72rem; }
.bm-post-txt { font-size: 0.85rem; line-height: 1.5; word-break: break-word; }
.bm-adjs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bm-adj { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 10px; font-size: 0.76rem; font-weight: 700; color: #0284c7; text-decoration: none; max-width: 100%; }
.bm-adj small { color: var(--muted); font-weight: 600; }
.bm-adj-img img { height: 110px; max-width: 220px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); display: block; }
.bm-adj-fila { justify-content: space-between; font-size: 0.8rem; text-transform: none; color: var(--text-color); border-bottom: 1px dashed var(--border-color); padding: 6px 0; }

/* Chats */
.bm-chat { display: flex; flex-direction: column; }
.bm-chat-cab { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 8px 10px; }
.bm-chat-lista { height: calc(100vh - 250px); min-height: 260px; overflow-y: auto; padding: 12px 2px; display: flex; flex-direction: column; gap: 6px; }
.bm-burbuja { align-self: flex-start; max-width: 80%; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: 0.86rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.bm-burbuja.mia { align-self: flex-end; background: var(--verde); color: #fff; border-color: var(--verde); border-radius: 14px 14px 4px 14px; }
.bm-burbuja time { display: block; font-size: 0.64rem; opacity: .7; margin-top: 3px; text-align: right; }
.bm-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.bm-chat-form textarea { resize: none; max-height: 120px; }
.bm-chat-form .bio-btn { height: 42px; }

/* Eventos */
.bm-grid2.plano { background: transparent; border: 0; padding: 0; margin: 0; }
.bm-ev-dia { flex-shrink: 0; width: 46px; text-align: center; background: rgba(126,168,66,0.12); color: var(--verde); border-radius: 10px; padding: 6px 0; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.bm-ev-dia b { display: block; font-size: 1.15rem; }
.bm-prio { --p: #f5a828; display: inline-block; background: color-mix(in srgb, var(--p) 16%, transparent); color: var(--p); font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; white-space: nowrap; }
.bm-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bm-cal-nom { text-align: center; font-size: 0.68rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.bm-cal-dia { aspect-ratio: 1 / 1; min-height: 38px; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.bm-cal-dia.hoy { border-color: var(--verde); color: var(--verde); }
.bm-cal-dia.con { background: rgba(126,168,66,0.1); }
.bm-cal-dia.elegido { background: var(--verde); color: #fff; }
.bm-cal-puntos { display: flex; gap: 2px; height: 5px; }
.bm-cal-puntos i { width: 5px; height: 5px; border-radius: 50%; }
.bm-invitados { max-height: 200px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 10px; margin-top: 6px; padding: 4px; text-transform: none; }
.bm-check-item { display: flex; align-items: center; gap: 8px; padding: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-color); cursor: pointer; border-radius: 8px; }
.bm-check-item:hover { background: var(--bg-main); }
.bm-check-item input { width: 18px; height: 18px; accent-color: var(--verde); }
.bm-check-item .bm-av { width: 28px; height: 28px; font-size: 0.75rem; }

/* Archivos */
.bm-migas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.bm-migas button { background: none; border: 0; padding: 4px 6px; border-radius: 6px; font-weight: 700; color: var(--verde); cursor: pointer; }
.bm-migas button:last-child { color: var(--text-color); }
.bm-carpetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bm-carpeta { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.bm-carpeta:hover { border-color: var(--verde); }
.bm-carpeta i { font-size: 2rem; color: #f5a828; }
.bm-carpeta span { font-size: 0.8rem; font-weight: 700; word-break: break-word; }
.bm-carpeta small { font-size: 0.68rem; color: var(--muted); }
.bm-arch-ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(2,132,199,0.1); color: #0284c7; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }

/* Historias: gestor */
.bm-soja { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bm-soja-col { border: 1px solid var(--border-color); border-radius: 12px; padding: 10px; margin: 0; display: grid; gap: 6px; min-width: 0; }
.bm-soja-col legend { font-size: 0.72rem; font-weight: 800; color: var(--verde); padding: 0 4px; }
.bm-hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.bm-hist-item { margin: 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.bm-hist-item img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; background: #0f172a; }
.bm-hist-item figcaption { padding: 8px; display: grid; gap: 4px; font-size: 0.76rem; }
.bm-hist-item small { color: var(--muted); font-size: 0.68rem; }

/* Historias: barra del escritorio y visor (como en el plugin) */
.bs-stories { display: flex; gap: 14px; overflow-x: auto; padding: 8px 2px 10px; scrollbar-width: none; }
.bs-stories::-webkit-scrollbar { display: none; }
.bs-story { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; width: 70px; flex-shrink: 0; }
.bs-story-ring { width: 62px; height: 62px; border-radius: 50%; padding: 2.5px; background: linear-gradient(45deg, #f5a828, #7ea842, #0284c7); display: block; }
.bs-story-circle { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--bg-main); display: grid; place-items: center; font-size: 1.35rem; }
html.oscuro .bs-story-circle { background: #1e293b; }
.bs-story-label { font-size: 0.68rem; font-weight: 700; }
.bs-story-visor { position: fixed; inset: 0; z-index: 2000000; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; }
.bs-story-visor[hidden] { display: none !important; }
.bs-story-tarjeta { position: relative; width: 100%; max-width: 480px; height: 100%; max-height: 920px; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bs-story-tarjeta img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bs-story-barras { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.bs-story-barras span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.3); position: relative; overflow: hidden; }
.bs-story-barras span.lleno { background: #fff; }
.bs-story-barras span.corre::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: bsCorre 6s linear forwards; }
@keyframes bsCorre { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bs-story-info { position: absolute; top: 22px; left: 14px; z-index: 3; color: #fff; background: rgba(0,0,0,0.5); padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; }
.bs-story-info span { opacity: .75; margin-left: 4px; }
.bs-story-cerrar { position: absolute; top: 20px; right: 12px; z-index: 4; width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; background: rgba(126,168,66,0.6); color: #fff; cursor: pointer; }
.bs-story-lado { position: absolute; top: 70px; bottom: 0; width: 40%; z-index: 2; background: transparent; border: 0; cursor: pointer; }
.bs-story-lado.ant { left: 0; }
.bs-story-lado.sig { right: 0; width: 60%; }
.bm-input::placeholder { color: var(--muted); opacity: .55; font-weight: 400; } /* 0.9.30 fase 3: el ejemplo no parece un valor cargado */

/* 0.9.30 Fase 4: administración (directorio y focos del día) */
.bm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 520px) { .bm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bm-stats div { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px; text-align: center; }
.bm-stats b { display: block; font-size: 1.3rem; color: var(--verde); }
.bm-stats span { font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.bm-cumples { background: #fff7ed; border-color: #ffedd5; font-size: 0.82rem; display: grid; gap: 4px; }
.bm-cumples > strong { color: #c2410c; font-size: 0.78rem; text-transform: uppercase; }
.bm-cumples b { color: #c2410c; margin-right: 4px; }
.bm-cumples small { color: #ea580c; }
.bm-sugerencia { background: #fefce8; border-color: #fef08a; }
.bm-sugerencia strong { color: #a16207; font-size: 0.85rem; }
.bm-sugerencia p { margin: 4px 0 0; font-size: 0.84rem; line-height: 1.4; }
html.oscuro .bm-cumples, html.oscuro .bm-sugerencia, html.oscuro .bm-endo { background: var(--bg-card); }
html.oscuro .bm-cumples > div, html.oscuro .bm-sugerencia p, html.oscuro .bm-endo > div { color: var(--text-color); }
.bm-foco { --c: #d97706; background: var(--bg-card); border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 3px; }
.bm-foco-un { font-size: 0.68rem; font-weight: 800; color: var(--c); text-transform: uppercase; }
.bm-foco strong { font-size: 0.92rem; }
.bm-foco small { font-size: 0.76rem; color: var(--muted); }
.bm-foco-estado { justify-self: start; font-size: 0.64rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; background: #fee2e2; color: #b91c1c; }
.bm-foco-estado.proceso { background: #fef3c7; color: #b45309; }
.bm-foco-estado.ok { background: #dcfce7; color: #15803d; }
.bm-foco.libre { border: 1px dashed var(--border-color); color: var(--muted); font-style: italic; font-size: 0.8rem; }
.bm-foco.bloqueado { font-style: normal; opacity: .6; background: var(--bg-main); }
.bm-endo { background: #faf5ff; border-color: #f3e8ff; font-size: 0.84rem; display: grid; gap: 4px; }
.bm-endo > strong { color: #7e22ce; font-size: 0.78rem; text-transform: uppercase; }

/* 0.9.30 Fase 5: consola Sacrobits (pedidos, rechazadas, ventas, tracking y roles) */
.bm-estado.aviso { background: rgba(245,168,40,0.18); color: #b45309; }
.bm-estado.ok { background: rgba(2,132,199,0.13); color: #0369a1; }
html.oscuro .bm-estado.aviso { color: #fbbf24; }
html.oscuro .bm-estado.ok { color: #38bdf8; }
.bm-scroll-x { overflow-x: auto; margin-top: 6px; }
.bm-tabla-datos { min-width: 420px; }
.bm-tabla-datos th { text-align: left; font-size: 0.68rem; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--border-color); }
.bm-tabla-datos td:first-child { width: auto; color: var(--text-color); font-weight: 600; }
.bm-tabla-datos td small { display: block; color: var(--muted); font-weight: 400; font-size: 0.7rem; }
.bm-tabla-datos .der { text-align: right; white-space: nowrap; }
.bm-tabla-datos tfoot td { border-top: 2px solid var(--border-color); border-bottom: 0; font-weight: 800; }
.bm-rech { border-left: 4px solid var(--rojo); display: grid; gap: 4px; }
.bm-rech-motivo { margin: 2px 0; color: var(--rojo); font-weight: 700; font-size: 0.84rem; }
.bm-cdc { word-break: break-all; }
.bm-ventas-filtros { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.bm-ventas-filtros .bm-select { width: auto; }
.bm-barras { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 140px; margin-top: 12px; border-bottom: 1px solid var(--border-color); }
.bm-barra { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; outline: none; }
.bm-barra span { display: block; width: 100%; max-width: 22px; margin: 0 auto; background: var(--verde); border-radius: 4px 4px 0 0; }
.bm-barra:hover span, .bm-barra:focus span { background: #5f8a2b; }
.bm-barras-eje { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.bm-caja { position: relative; }
.bm-barras-tip { position: absolute; top: 46px; background: var(--bg-card); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 4px 8px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.15); pointer-events: none; }
.bm-camion { display: grid; gap: 6px; }
.bm-carga { height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; }
.bm-carga span { display: block; height: 100%; background: var(--verde); border-radius: 4px; }
.bm-btn-ancho { width: 100%; margin-top: 4px; }
.bm-lista-items { margin: 6px 0 0; padding-left: 18px; font-size: 0.8rem; }
.bm-rol-hist { font-size: 0.8rem; padding: 6px 0; border-bottom: 1px solid var(--border-color); }
.bm-rol-hist:last-child { border-bottom: 0; }
.bm-rol-hist small { color: var(--muted); }
.bm-item input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--verde); }
.bm-camion .bm-btn-mini { justify-self: start; }

/* 0.9.30 Fase 6: módulos sueltos del cliente (contactos, sucursales, clima, soja CBOT) y notificaciones */
.bio-campana { position: relative; }
.bio-campana .bio-insignia { top: -5px; right: -6px; min-width: 18px; height: 18px; font-size: 0.64rem; }
.bio-insignia[hidden], .bm-contacto[hidden] { display: none; }
.bm-emerg { border-color: #fca5a5; background: rgba(239,68,68,0.06); }
.bm-emerg strong { color: #dc2626; font-size: 0.85rem; }
html.oscuro .bm-emerg strong { color: #f87171; }
.bm-emerg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (max-width: 420px) { .bm-emerg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bm-emerg-grid a { display: grid; justify-items: center; gap: 2px; background: #dc2626; color: #fff; border-radius: 10px; padding: 8px 4px; text-decoration: none; font-size: 0.74rem; font-weight: 700; }
.bm-emerg-grid a b { font-size: 1rem; }
.bm-contacto-acc { display: flex; gap: 6px; flex: none; }
.bm-wa-mini i { color: #25d366; }
@media (max-width: 460px) { .bm-contacto-acc span { display: none; } .bm-contacto-acc .bm-btn-mini { padding: 8px 10px; font-size: 0.9rem; } }
.bm-mapa { border-radius: 14px; overflow: hidden; border: 1px solid var(--border-color); margin-bottom: 12px; background: var(--bg-main); }
.bm-mapa iframe { display: block; width: 100%; height: 55vh; min-height: 300px; border: 0; }
.bm-suc-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.bm-suc { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-color); }
.bm-clima-temp { display: flex; align-items: center; gap: 14px; }
.bm-clima-temp > i { font-size: 2.6rem; width: 48px; text-align: center; }
.bm-clima-temp > b { font-size: 3rem; line-height: 1; color: var(--text-color); }
.bm-clima-temp span { display: grid; gap: 2px; }
.bm-clima-temp small { color: var(--muted); font-size: 0.78rem; }
.bm-clima-datos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.bm-clima-datos div { background: var(--bg-main); border-radius: 10px; padding: 8px; display: grid; gap: 1px; font-size: 0.72rem; color: var(--muted); }
.bm-clima-datos i { color: #0284c7; }
.bm-clima-datos b { font-size: 0.95rem; color: var(--text-color); }
.bm-clima-dias { padding: 4px 12px; }
.bm-clima-dia { display: grid; grid-template-columns: 64px 22px minmax(0, 1fr) 132px; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border-color); font-size: 0.82rem; }
.bm-clima-dia:last-child { border-bottom: 0; }
.bm-clima-nom { font-weight: 700; }
.bm-clima-dia > i { color: #0284c7; text-align: center; }
.bm-clima-desc { display: grid; min-width: 0; }
.bm-clima-desc small { color: var(--muted); font-size: 0.7rem; }
.bm-clima-rango { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 6px; font-weight: 700; }
.bm-clima-rango small:first-child { color: var(--muted); text-align: right; }
.bm-clima-barra { position: relative; height: 6px; background: var(--border-color); border-radius: 3px; }
.bm-clima-barra span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #38bdf8, #f59e0b); }
@media (max-width: 440px) { .bm-clima-dia { grid-template-columns: 54px 20px minmax(0, 1fr); } .bm-clima-rango { grid-column: 3; } }
.bm-cbot-hero { display: grid; gap: 4px; }
.bm-cbot-hero .bm-info { margin: 0; }
.bm-cbot-precio { font-size: 2rem; line-height: 1.1; }
.bm-cbot-precio small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.bm-cbot-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.82rem; color: var(--muted); }
.bm-var { font-weight: 700; white-space: nowrap; font-size: 0.8rem; }
.bm-var.sube { color: #15803d; } .bm-var.baja { color: #dc2626; } .bm-var.igual { color: var(--muted); }
html.oscuro .bm-var.sube { color: #4ade80; } html.oscuro .bm-var.baja { color: #f87171; }
.bm-cbot-tit { display: block; font-size: 0.88rem; margin-bottom: 6px; }
.bm-cbot-tit small { color: var(--muted); font-weight: 500; }
.bm-cbot-graf { position: relative; touch-action: pan-y; }
.bm-cbot-graf svg { display: block; width: 100%; height: auto; }
.bm-cbot-grid { stroke: var(--border-color); stroke-width: 1; }
.bm-cbot-eje { fill: var(--muted); font-size: 11px; }
.bm-cbot-linea { fill: none; stroke: var(--verde); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bm-cbot-fin, .bm-cbot-punto { fill: var(--verde); stroke: var(--bg-main); stroke-width: 2; }
.bm-cbot-cruz { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.bm-cbot-graf .bm-barras-tip { transform: translate(-50%, calc(-100% - 12px)); display: grid; text-align: center; }
.bm-cbot-graf .bm-barras-tip[hidden] { display: none; }
.bm-cbot-graf .bm-barras-tip span { color: var(--muted); font-weight: 500; font-size: 0.68rem; }
.bm-cbot-sub2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bm-cbot-sub2 div { text-align: left; display: grid; gap: 2px; }
.bm-cbot-sub2 b { font-size: 1.1rem; color: var(--text-color); }
.bm-pizarra summary { cursor: pointer; font-weight: 700; font-size: 0.88rem; }
.bm-pizarra-marco { margin-top: 10px; border-radius: 10px; overflow: hidden; background: #0c0c0e; }
.bm-pizarra-marco iframe { display: block; width: 100%; height: 70vh; border: 0; }
.bm-notif-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.bm-notif-cab .bm-info { margin: 0; }
.bm-notif.nueva { border-color: var(--verde); background: rgba(126,168,66,0.08); }
.bm-notif-av { position: relative; flex: none; }
.bm-notif-av > i { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 0.6rem; display: grid; place-items: center; border: 2px solid var(--bg-main); box-sizing: content-box; }
.bm-vacio .fa-2x { opacity: 0.4; }
.bm-notif .bm-item-txt strong { white-space: normal; overflow-wrap: anywhere; font-weight: 600; line-height: 1.3; }

/* 0.9.30 Fase 7: enlace del login a la landing */
.bio-login-volver { text-align: center; color: var(--muted); font-size: 0.82rem; text-decoration: none; }

/* 0.9.30 Fase 7: la descripción de la ficha respeta los renglones */
#bmc-m-desc { white-space: pre-line; }
