/* Portal de la intranet — colores del manual de marca de Telemedicina Clínica MCH */
:root {
  --purpura: #bd11b5; --purpura-osc: #a52db4; --purpura-60: #d36dd0; --purpura-25: #ebc9ea; --purpura-10: #f8ecf8;
  --azul: #687f8d; --azul-osc: #4f6371; --azul-claro: #e9eef1;
  --fondo: #f7f7f7; --borde: #dfe4e8; --texto: #2b3640; --gris: #6f7a84;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 "Century Gothic", "Futura", "Segoe UI", Arial, sans-serif; color: var(--texto); background: var(--fondo); }
a { color: inherit; }

/* ---------- Ingreso (mismo diseño de la pantalla actual) ---------- */
body.ingreso { min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  font-family: "Montserrat", "Century Gothic", "Segoe UI", Arial, sans-serif;
  background: #0f1d2b center center / cover no-repeat fixed; }
.ingreso-caja { width: 100%; max-width: 400px; background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ingreso form { display: block; }
.ingreso label { display: block; color: #6a8998; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 4px; }
.ingreso input[type=text], .ingreso input[type=password] { width: 100%; padding: 12px 16px; border: 1.5px solid #d0dde5; border-radius: 8px;
  font: inherit; font-size: 15px; margin: 0 0 20px; color: #2b3640; }
.ingreso input[type=text]:focus, .ingreso input[type=password]:focus { outline: none; border-color: #bc0fb6; box-shadow: 0 0 0 3px rgba(188,15,182,.12); }
.ingreso .recordar { display: flex; align-items: center; gap: 6px; margin: 0 0 22px; cursor: pointer; }
.ingreso button { width: 100%; padding: 14px; background: linear-gradient(135deg, #bc0fb6, #8c0b87); color: #fff; border: 0; border-radius: 8px;
  font: inherit; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; }
.ingreso button:hover { filter: brightness(1.08); }
.ingreso-error { background: #fbeaea; color: #8a1f1f; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 18px; }
.olvido { display: block; text-align: center; margin-top: 18px; font-size: 12px; color: #6a8998; text-decoration: none; }
.olvido:hover { color: #bc0fb6; }
.ingreso-logo-movil { display: none; }
@media (max-width: 760px) {
  /* En celular el logo del fondo queda recortado: se muestra encima de la tarjeta */
  body.ingreso { flex-direction: column; justify-content: flex-start; padding-top: 40px; background-position: 70% center; background-attachment: scroll; }
  .ingreso-logo-movil { display: block; width: 220px; max-width: 70%; margin: 0 0 28px; }
  .ingreso-caja { padding: 30px 24px; }
}

/* ---------- Portal (mismo diseño del inicio actual, mejorado) ---------- */
body.portal { background: #fff; font-family: "Montserrat", "Century Gothic", "Segoe UI", Arial, sans-serif; }
.p-barra { background: #fff; border-bottom: 1px solid #e5e8eb; }
.p-barra-in { max-width: 1200px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p-sitio { font-size: 22px; font-weight: 700; color: #1f2a33; text-decoration: none; }
.p-menu { display: flex; gap: 22px; }
.p-menu a { text-decoration: none; color: #4f6371; font-size: 15px; }
.p-menu a.activo, .p-menu a:hover { color: #1f6fb2; }

.p-main { max-width: 1160px; margin: 0 auto; padding: 46px 24px 60px; }
.p-bienvenida { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; color: #fff;
  background: linear-gradient(90deg, #34505f 0%, #4e6b7b 55%, #6a8998 100%); border-radius: 16px; padding: 26px 34px;
  box-shadow: 0 10px 28px rgba(52,80,95,.18); }
.p-logo { height: 54px; width: auto; display: block; }
.p-textos { flex: 1; min-width: 240px; }
.p-textos h1 { margin: 0; font-size: 24px; font-weight: 700; }
.p-textos p { margin: 6px 0 0; font-size: 14px; opacity: .9; }
.p-cuenta { display: grid; justify-items: end; gap: 6px; text-align: right; }
.p-usuario { font-size: 14px; font-weight: 600; }
.p-fecha { font-size: 12px; opacity: .8; }
.p-salir { font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.12); padding: 7px 16px; border-radius: 8px; margin-top: 2px; }
.p-salir:hover { background: rgba(255,255,255,.24); }

.p-modulos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 34px; }
.p-tarjeta { --c: #6a8998; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  text-decoration: none; background: #fff; border-radius: 16px; border-top: 6px solid var(--c);
  box-shadow: 0 4px 18px rgba(31,42,51,.08); padding: 30px 26px 28px; min-height: 250px; transition: transform .15s, box-shadow .15s; }
a.p-tarjeta:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(31,42,51,.14); }
.p-icono { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.p-nombre { font-size: 18px; font-weight: 700; color: #1f2a33; }
.p-desc { font-size: 14px; color: #7a8a96; line-height: 1.5; flex: 1; }
.p-btn { margin-top: 6px; background: var(--c); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 20px; border-radius: 8px; }
.p-pronto { opacity: .55; }
.p-pronto .p-btn { background: #e9eef1; color: #7a8a96; }
.p-pie { text-align: center; color: #7a8a96; font-size: 12px; padding: 0 0 28px; }

@media (max-width: 980px) { .p-modulos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .p-barra-in { padding: 14px 16px; }
  .p-sitio { font-size: 17px; }
  .p-main { padding: 22px 16px 40px; }
  .p-bienvenida { padding: 22px; gap: 16px; }
  .p-logo { height: 42px; }
  .p-cuenta { justify-items: start; text-align: left; width: 100%; }
  .p-modulos { grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
  .p-tarjeta { min-height: 0; }
}

/* ---------- Usuarios y Mi cuenta ---------- */
.u-main { max-width: 1160px; }
.u-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.u-cabeza h1 { margin: 0; font-size: 24px; color: #1f2a33; }
.u-btn { background: linear-gradient(135deg, #bc0fb6, #8c0b87); color: #fff; border: 0; border-radius: 8px; padding: 11px 20px; font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.u-btn:hover { filter: brightness(1.08); }
.u-btn2 { background: #e9eef1; color: #34505f; border: 0; border-radius: 8px; padding: 0 14px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.u-volver { color: #6a8998; text-decoration: none; font-weight: 600; font-size: 14px; }
.u-volver:hover { color: #bc0fb6; }
.u-aviso { background: #e8f6ee; color: #1e6b41; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.u-error { background: #fbeaea; color: #8a1f1f; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.u-caja { background: #fff; border-radius: 16px; box-shadow: 0 4px 18px rgba(31,42,51,.08); padding: 22px; }
.u-buscar { width: 100%; max-width: 360px; padding: 10px 14px; border: 1.5px solid #d0dde5; border-radius: 8px; font: inherit; margin-bottom: 14px; }
.u-tabla-env { overflow-x: auto; }
.u-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.u-tabla th { text-align: left; color: #6a8998; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 10px; border-bottom: 2px solid #e5e8eb; white-space: nowrap; }
.u-tabla td { padding: 12px 10px; border-bottom: 1px solid #eef1f3; vertical-align: middle; }
.u-tabla tr.u-inactivo td { color: #9aa6af; }
.u-ve { max-width: 280px; color: #4f6371; }
.u-tu { background: #f8ecf8; color: #a52db4; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 6px; }
.u-perfil { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.u-admin, .u-wpadmin { background: #f8ecf8; color: #a52db4; }
.u-usuario { background: #e9eef1; color: #4f6371; }
.u-estado { font-size: 12px; font-weight: 700; white-space: nowrap; }
.u-estado.si { color: #1e8a4c; } .u-estado.no { color: #c0392b; }
.u-editar { color: #bc0fb6; font-weight: 700; text-decoration: none; }
.u-nota { color: #6f7a84; font-size: 13px; margin: 14px 2px 0; }
.u-form h2 { font-size: 16px; color: #34505f; margin: 26px 0 10px; }
.u-form label { display: block; color: #4f6371; font-weight: 600; font-size: 13px; }
.u-form input[type=text], .u-form input[type=email], .u-form input[type=password] { display: block; width: 100%; padding: 11px 14px; border: 1.5px solid #d0dde5; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 400; margin: 5px 0 4px; color: #2b3640; }
.u-form input:focus { outline: none; border-color: #bc0fb6; box-shadow: 0 0 0 3px rgba(188,15,182,.12); }
.u-form input:disabled { background: #f4f6f8; color: #7a8a96; }
.u-form small { display: block; color: #8a97a1; font-weight: 400; font-size: 12px; margin-bottom: 10px; }
.u-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.u-clave { display: flex; gap: 8px; } .u-clave input { flex: 1; }
.u-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.u-opcion { display: flex !important; gap: 10px; align-items: flex-start; border: 1.5px solid #e5e8eb; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.u-opcion:has(input:checked) { border-color: #bc0fb6; background: #fdf6fd; }
.u-opcion input { margin-top: 3px; accent-color: #bc0fb6; }
.u-modulos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.u-mod { display: flex !important; gap: 8px; align-items: center; border: 1.5px solid #e5e8eb; border-left: 5px solid var(--c); border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.u-mod input { accent-color: #bc0fb6; }
.u-mod small { display: inline; margin: 0; }
.u-apagado { opacity: .45; pointer-events: none; }
.u-acciones { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.u-angosto { max-width: 480px; }
@media (max-width: 760px) {
  .u-grid, .u-opciones { grid-template-columns: 1fr; }
  .u-modulos { grid-template-columns: 1fr; }
  .u-caja { padding: 16px; }
}

/* ---------- Actividad ---------- */
.a-punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #cfd8de; margin-right: 8px; vertical-align: 1px; }
.a-punto.on { background: #27ae60; box-shadow: 0 0 0 3px rgba(39,174,96,.18); }
.a-gris { color: #8a97a1; font-size: 13px; }
.a-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.a-kpi { background: #fff; border-radius: 14px; border-top: 5px solid #6a8998; box-shadow: 0 4px 18px rgba(31,42,51,.08); padding: 16px 18px; }
.a-kpi b { display: block; font-size: 28px; color: #34505f; }
.a-kpi span { color: #6f7a84; font-size: 13px; }
.a-kpi.on { border-top-color: #27ae60; } .a-kpi.on b { color: #1e8a4c; }
.a-kpi.no { border-top-color: #e74c3c; } .a-kpi.no b { color: #c0392b; }
.a-h2 { font-size: 18px; color: #1f2a33; margin: 28px 0 12px; }
.a-sesion { font-size: 13px; margin: 2px 0; white-space: nowrap; }
.a-cerrar { background: #fff; color: #c0392b; border: 1.5px solid #e9b1aa; border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.a-cerrar:hover { background: #fbeaea; }
.a-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.a-filtros label { display: block; color: #4f6371; font-weight: 600; font-size: 12px; }
.a-filtros select, .a-filtros input { display: block; margin-top: 4px; padding: 9px 10px; border: 1.5px solid #d0dde5; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.a-filtros .u-btn { padding: 10px 18px; }
.a-csv { margin-left: auto; padding: 11px 14px; text-decoration: none; }
.a-registro td { font-size: 13px; }
.a-fecha { white-space: nowrap; }
.a-ev { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.a-si { background: #e8f6ee; color: #1e6b41; } .a-no { background: #fbeaea; color: #a1281c; }
.a-gris.a-ev, .a-ev.a-gris { background: #eef1f3; color: #5f6d77; font-size: 12px; } .a-admin { background: #f8ecf8; color: #a52db4; }
@media (max-width: 760px) { .a-kpis { grid-template-columns: 1fr 1fr; } .a-csv { margin-left: 0; } }
@media (max-width: 640px) { .p-menu { flex-wrap: wrap; gap: 6px 16px; } .p-menu a { font-size: 14px; white-space: nowrap; } }
