﻿/* ============================================================================
   DeBlue Social — identidad para ingreso, portal del cliente y panel.
   Mismos colores y tipografías que el sitio de DeBlue Byte, sobre Bootstrap 5.
   ========================================================================== */
:root {
  --brand: #0b6b82; --brand-2: #1697b5; --brand-3: #5fd0ea;
  --tinta: #08202a; --tinta-2: #0d2c38; --tinta-3: #163f4e;
  --suave: #f2f7f9; --linea: #dbe6eb; --texto: #17262d; --tenue: #5d7079;
  --bs-primary: #0b6b82; --bs-primary-rgb: 11,107,130;
  --bs-link-color: #0b6b82; --bs-link-color-rgb: 11,107,130; --bs-link-hover-color: #08202a;
  --bs-body-font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: #17262d;
}
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, .navbar-brand, .titulo { font-family: 'Exo', 'IBM Plex Sans', sans-serif; letter-spacing: -.01em; }
.btn-primary { --bs-btn-bg: #0b6b82; --bs-btn-border-color: #0b6b82; --bs-btn-hover-bg: #095a6d; --bs-btn-hover-border-color: #095a6d;
  --bs-btn-active-bg: #08495a; --bs-btn-active-border-color: #08495a; --bs-btn-disabled-bg: #0b6b82; --bs-btn-disabled-border-color: #0b6b82; }
.btn-outline-primary { --bs-btn-color: #0b6b82; --bs-btn-border-color: #0b6b82; --bs-btn-hover-bg: #0b6b82; --bs-btn-hover-border-color: #0b6b82;
  --bs-btn-active-bg: #0b6b82; --bs-btn-active-border-color: #0b6b82; }
.btn-marca { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(22,151,181,.28); }
.btn-marca:hover, .btn-marca:focus { color: #fff; filter: brightness(1.05); }
.text-marca { color: var(--brand) !important; }
.bg-tinta { background: var(--tinta) !important; }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(22,151,181,.15); }

/* Marca del producto */
.marca-social { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.marca-social img { width: 34px; height: 34px; border-radius: 8px; }
.marca-social .nombre { font-family: 'Exo', sans-serif; font-weight: 800; font-size: 1.2rem; line-height: 1; }
.marca-social .nombre b { color: var(--brand-3); }
.marca-social.oscura { color: var(--tinta); }
.marca-social.oscura .nombre b { color: var(--brand-2); }

/* ---------------------------------------------------------------- Ingreso */
.acceso { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.05fr; }
.acceso-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.acceso-caja { width: 100%; max-width: 400px; }
.acceso-caja h1 { font-size: 1.8rem; font-weight: 800; margin: 26px 0 6px; }
.acceso-caja .intro { color: var(--tenue); margin-bottom: 24px; }
.acceso-caja .form-control { padding: .7rem .9rem; border-radius: 10px; }
.acceso-caja .btn-marca { width: 100%; padding: .75rem; border-radius: 999px; font-weight: 600; }
.acceso-pie { margin-top: 22px; font-size: .9rem; color: var(--tenue); text-align: center; }
.acceso-plano {
  position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 60px;
  background: radial-gradient(900px 500px at 80% 10%, rgba(22,151,181,.35), transparent 60%),
              radial-gradient(700px 400px at 0% 100%, rgba(11,107,130,.45), transparent 60%), var(--tinta);
}
.acceso-plano::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%); }
.acceso-plano > * { position: relative; }
.acceso-plano h2 { font-weight: 800; font-size: clamp(1.7rem, 2.6vw, 2.4rem); max-width: 520px; }
.acceso-plano p { color: #c6d9e0; max-width: 480px; font-size: 1.05rem; }
.acceso-plano ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; max-width: 460px; }
.acceso-plano li { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); padding: 12px 14px; border-radius: 12px; }
.acceso-plano li i { color: var(--brand-3); font-size: 1.2rem; }
@media (max-width: 900px) { .acceso { grid-template-columns: 1fr; } .acceso-plano { display: none; } }

/* ---------------------------------------------------------------- Portal */
body.portal { background: var(--suave); }
.portal-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.portal-lateral { background: var(--tinta); color: #c6d9e0; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.portal-lateral .marca-social { padding: 4px 8px 18px; }
.portal-lateral .empresa { margin: 0 6px 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.portal-lateral .empresa span { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #7f9aa4; }
.portal-lateral .empresa strong { color: #fff; font-family: 'Exo', sans-serif; }
.portal-lateral nav { display: grid; gap: 2px; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.portal-lateral nav::-webkit-scrollbar { width: 6px; }
.portal-lateral nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.portal-lateral .marca-social, .portal-lateral .empresa { flex-shrink: 0; }
.portal-lateral nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c6d9e0; text-decoration: none; font-weight: 500; }
.portal-lateral nav a i { font-size: 1.1rem; width: 20px; text-align: center; }
.portal-lateral nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.portal-lateral nav a.on { background: linear-gradient(135deg, rgba(11,107,130,.6), rgba(22,151,181,.35)); color: #fff; }
.portal-lateral nav a .badge { margin-left: auto; }
.portal-lateral .grupo { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #6f8a94; margin: 16px 12px 6px; }
.portal-lateral .pie { margin-top: 10px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.portal-lateral .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-2); color: #fff; font-weight: 600; font-size: .85rem; flex: 0 0 36px; }
.portal-lateral .pie .nom { color: #fff; font-size: .88rem; line-height: 1.2; }
.portal-lateral .pie a { color: #8fb3bf; font-size: .78rem; text-decoration: none; }
.portal-lateral .pie button { margin-left: auto; background: none; border: 0; color: #8fb3bf; font-size: 1.2rem; }
.portal-lateral .pie button:hover { color: #fff; }
.portal-main { padding: 28px 32px 60px; min-width: 0; }
.portal-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.portal-cab h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.portal-cab .bajada { color: var(--tenue); margin: 2px 0 0; }
.portal-movil { display: none; }
/* Pantallas bajas: menú más compacto */
@media (max-height: 760px) {
  .portal-lateral { padding-top: 14px; padding-bottom: 14px; }
  .portal-lateral .marca-social { padding-bottom: 10px; }
  .portal-lateral .empresa { margin-bottom: 10px; padding: 8px 12px; }
  .portal-lateral nav a { padding: 7px 12px; }
  .portal-lateral .grupo { margin-top: 10px; }
}
@media (max-width: 900px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-lateral { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 1040; transform: translateX(-100%); transition: transform .2s; }
  .portal-lateral.abierto { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .portal-movil { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--tinta); position: sticky; top: 0; z-index: 1030; }
  .portal-movil button { background: none; border: 0; color: #fff; font-size: 1.5rem; }
  .portal-main { padding: 20px 16px 50px; }
}

.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 22px; }
.tarjeta h2, .tarjeta h3 { font-size: 1.1rem; font-weight: 700; }
.kpi { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 18px 20px; height: 100%; }
.kpi span { color: var(--tenue); font-size: .85rem; }
.kpi strong { display: block; font-family: 'Exo', sans-serif; font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--tinta); }
.kpi.alerta { border-color: #f0c36d; background: #fffaf0; }

.pub-card { background: #fff; border: 1px solid var(--linea); border-radius: 16px; overflow: hidden; height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.pub-card:hover { border-color: var(--brand-2); box-shadow: 0 8px 24px rgba(8,32,42,.08); transform: translateY(-2px); color: inherit; }
.pub-card .media { aspect-ratio: 4/5; background: #0d2c38; position: relative; }
.pub-card .media img, .pub-card .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-card .media .tipo { position: absolute; top: 10px; left: 10px; background: rgba(8,32,42,.75); color: #fff; font-size: .72rem; padding: 3px 9px; border-radius: 999px; }
.pub-card .cuerpo { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pub-card .copy { font-size: .88rem; color: #33474f; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-card .fecha { font-size: .8rem; color: var(--tenue); margin-top: auto; }
.estado { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.estado-2 { background: #fff4d6; color: #8a5a00; }
.estado-3 { background: #e1f3f8; color: #0b6b82; }
.estado-4 { background: #e3f4ea; color: #1f7a4d; }
.estado-5 { background: #fbeceb; color: #bc3b2e; }
.estado-6, .estado-1 { background: #eef1f3; color: #5d7079; }
.estado-7 { background: #ece8fb; color: #5b45b5; }

.conexion { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--linea); background: #fff; }
.conexion .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex: 0 0 44px; }
.conexion .ico.fb { background: #1877f2; } .conexion .ico.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.btn-facebook { background: #1877f2; color: #fff; border: 0; font-weight: 600; }
.btn-facebook:hover { background: #1464cc; color: #fff; }

.chat-portal { height: calc(100vh - 290px); min-height: 360px; overflow-y: auto; background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 18px; }
.chat-portal .msg { max-width: 82%; padding: .65rem .95rem; border-radius: 14px; margin-bottom: .6rem; white-space: pre-wrap; }
.chat-portal .msg.user { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; margin-left: auto; border-top-right-radius: 4px; }
.chat-portal .msg.assistant { background: var(--suave); border-top-left-radius: 4px; white-space: normal; }
.chat-sugerencias .btn { border-radius: 999px; }

.foto-card { position: relative; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--linea); }
.foto-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.foto-card .pie-foto { padding: 8px 10px; font-size: .8rem; }
.zona-subida { border: 2px dashed #b9cfd8; border-radius: 16px; background: #fff; padding: 28px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.zona-subida:hover, .zona-subida.arrastrando { border-color: var(--brand-2); background: #f3fafc; }
.zona-subida i { font-size: 2.2rem; color: var(--brand-2); }

/* ---------------------------------------------------------------- Panel (equipo) */
.navbar-deblue { background: var(--tinta) !important; }
.navbar-deblue .nav-link { color: #c6d9e0; }
.navbar-deblue .nav-link:hover, .navbar-deblue .nav-link:focus { color: #fff; }
.navbar-deblue .dropdown-menu { border-radius: 12px; border-color: var(--linea); }
