/* Estilo By Daniela Cruz*/


* { margin:0; padding:0; box-sizing:border-box; }
html,body { height:100%; }

/* Body / layout */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f6f9;
  color: #222;
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR (fijo, colores) */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg,#0a1f44 0%, #0e274f 100%);
  color: #fff;
  min-height: 100vh;
  padding: 26px 18px;
  position: fixed;
  left: 0;
  top: 0;
  transition: transform .28s ease, width .28s ease, padding .28s ease;
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Título del sidebar */
.sidebar h2{
  font-size: 16px;
  letter-spacing: 0.2px;
  text-align: center;
  margin-bottom: 18px;
  font-weight: 600;
}

/* Menu */
.sidebar nav ul { list-style: none; padding: 0; }
.sidebar nav li { margin-bottom: 12px; }

/* Botones del menú*/
.sidebar a {
  display: block;
  padding: 12px 14px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  font-size: 15px;
  transition: background .18s ease, transform .12s ease;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.02);
}

/* Hover / activo */
.sidebar a:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}
.sidebar a.activo{
  background: rgba(255,255,255,0.08);
  font-weight: 700;
  border-left: 4px solid rgba(255,255,255,0.12);
  padding-left: 10px; /* compensa el borde */
}

/* Cerrar sesión*/
.cerrar-sesion {
  margin-top: 18px;
}
.cerrar-sesion a {
  display:block;
  text-align:center;
  padding:10px;
  border-radius:8px;
  background:#2563EB;
  color:#fff;
  text-decoration:none;
}
.cerrar-sesion a:hover { background:#2563EB; }

/* Sidebar oculto (retractil) */
.sidebar.oculto {
  transform: translateX(-260px);
  width: 0;
  padding: 0;
  overflow: hidden;
}

/*CONTENIDO PRINCIPAL*/
.contenido {
  margin-left: 260px; /* espacio para el sidebar */
  padding: 28px 32px;
  flex: 1;
  min-height: 100vh;
  transition: margin-left .28s ease;
  background: #fff;
}

/* Cuando sidebar está oculto */
.contenido.full {
  margin-left: 20px;
}

/* Botón para retraer (ubicado dentro del contenido) */
.toggle-btn {
  background: #0a1f44;
  color: white;
  border: none;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.toggle-btn:hover { background: #163060; }

/* Topbar / titulo del módulo (está en el área de contenido)*/
.topbar {
  display:flex;
  justify-content: center; /* títuloooo*/
  align-items: center;
  border-bottom: 1px solid #e6e9ef;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.topbar h1 {
  color: #0a1f44;
  font-size: 20px;
  font-weight: 700;
}

/* TARJETAS / ESTADÍSTICAS*/
.estadisticas {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  align-items: stretch;
}

.card {
  flex:1;
  background: linear-gradient(180deg,#fbfdff,#f7f9fc);
  border: 2px solid rgba(10,31,68,0.12);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(10,31,68,0.05);
}
.card h3 { color:#0a1f44; font-size:15px; margin-bottom:8px; }
.card p { color:#0a1f44; font-weight:700; font-size:22px; }

/*FORMULARIOS (tarjeta centrada)*/
.formulario {
  max-width: 720px;
  background: #fff;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,35,70,0.06);
  border: 1px solid rgba(10,31,68,0.06);
}

.formulario label {
  display:block;
  margin-top:12px;
  font-weight:600;
  color:#243447;
}
.formulario input, .formulario select, .formulario textarea {
  width:100%;
  padding:10px 12px;
  margin-top:8px;
  border-radius:8px;
  border:1px solid #d6dbe5;
  font-size:14px;
  background:#fbfdff;
  color:#23323d;
}
.formulario textarea { resize: vertical; min-height:110px; }

.formulario button {
  margin-top:16px;
  background: #0a1f44;
  color:#fff;
  padding:12px;
  width:100%;
  border-radius:8px;
  border:none;
  font-weight:700;
  cursor:pointer;
}
.formulario button:hover { background:#163060; }

/*TABLAS (Consulta de Tickets) */
.tabla-contenedor {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(10,31,68,0.06);
  box-shadow: 0 8px 20px rgba(10,31,68,0.04);
}

table {
  width:100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size:14px;
}
table th, table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef1f6;
  text-align:center;
}
table th {
  background: linear-gradient(180deg,#0a1f44,#0a2744);
  color:#fff;
  font-weight:700;
}
table tbody tr:hover { background: #fbfdff; }

/* Botón ver */
.btn-ver {
  display:inline-block;
  padding:6px 10px;
  border-radius:7px;
  background: #0a1f44;
  color:#fff;
  text-decoration:none;
  font-weight:700;
}
.btn-ver:hover { background:#163060; }

/* Responsive básica */
@media (max-width:900px){
  .estadisticas { flex-direction: column; }
  .contenido { padding:16px; }
}

/* Vista previa del ticket */
.ticket-detalle {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(10,31,68,0.08);
  border: 1px solid rgba(10,31,68,0.12);
  max-width: 800px;
}

.ticket-detalle h2 {
  color: #0a1f44;
  margin-bottom: 12px;
}

.ticket-detalle p {
  margin: 8px 0;
  line-height: 1.4;
  font-size: 15px;
}

.ticket-detalle h3 {
  margin-top: 20px;
  color: #163060;
}

/* Botón cerrar ticket */
.acciones-ticket {
  margin-top: 24px;
  text-align: right;
}

.btn-cerrar-ticket {
  background: #c0392b;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.btn-cerrar-ticket:hover {
  background: #a93226;
}

/* Contenido normal con sidebar abierto */
.contenido {
  margin-left: 260px;   /* ancho del sidebar */
  padding: 28px 32px;
  flex: 1;
  transition: margin-left .28s ease;
}

/* Contenido expandido cuando el sidebar está oculto */
.contenido.full {
  margin-left: 0;
}

.logo-container {
  text-align: center;
  margin-bottom: 10px;
}

.logo-container img {
  max-width: 120px;   /* Ajusta al tamaño*/
  height: auto;
  display: inline-block;
}

/* Etiquetas de estado */
.estado {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  display: inline-block;
  min-width: 90px;
  text-align: center;
}

/* Colores */
.estado.abierto {
  background: #007bff; /* azul */
}

.estado.proceso {
  background: #fd7e14; /* naranja */
}

.estado.cerrado {
  background: #28a745; /* verde */
}


.graficas-contenedor {
  display: flex;
  flex-direction: row;    
  justify-content: space-between;
  align-items: center;    /* centra verticalmente */
  gap: 20px;
  margin-top: 20px;
}

.grafica {
  flex: 1 1 50%;          
  max-width: 50%;         
  display: flex;
  justify-content: center;
  align-items: center;
}

.grafica canvas {
  width: 400px !important;   /* tamaño fijo */
  height: 300px !important;  /* tamaño fijo */
  display: block;
  margin: 0 auto;
  background: #fff;          /* fondo blanco */
  border-radius: 10px;       /*esquinas redondeadas */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /*sombra */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/*ESTILO DE LOS CLIENTES*/



/* ESTILO CLIENTE GRUPO MODELO*/
body.modelo {
  --color-principal: #D7A32E;
  --color-fondo: #f9f9f9;
}

/* Topbar y botones */
body.modelo .topbar h1,
body.modelo .btn-crear,
body.modelo .btn-ver,
body.modelo .btn-volver {
  background: var(--color-principal);
  color: white;
}

/* Tarjetas / Estadísticas */
body.modelo .card h3 { color: #000; }
body.modelo .card p span {
  background: var(--color-principal);
  padding: 6px 36px;   /* más alargado */
  border-radius: 45px; /* más ovalado */
  font-size: 13px;     /* número más pequeño */
  color: #fff;
  font-weight: 700;
}

.logo-cliente {
  height: 55px;
  width: auto;
  margin-right: 30px;
  vertical-align: middle;
}

/* Tabla encabezado */
body.modelo table th {
  background: var(--color-principal);
}

/* Detalle del ticket */
body.modelo .ticket-detalle {
  background: #fff;
  width: 95%;
  max-width: 750px;
  margin-top: 25px;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border-left: 5px solid var(--color-principal);
}
body.modelo .ticket-detalle h2,
body.modelo .ticket-detalle strong,
body.modelo .ticket-detalle h3 { color: var(--color-principal); }
body.modelo .documentos { border-left: 4px solid var(--color-principal); }

/* Botón volver (alineado a la derecha) */
body.modelo .acciones {
  margin-top: 25px;
  text-align: right;
  padding-right: 0;
}
body.modelo .btn-volver {
  background: var(--color-principal);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-right: 0;
}
body.modelo .btn-volver:hover {
  background: #b78b26;
}

/* ESTILO CLIENTE 3B*/
body.tresb {
  --color-principal: #B5121B;
  --color-fondo: #f9f9f9;
}

body.tresb .topbar h1,
body.tresb .btn-crear,
body.tresb .btn-ver,
body.tresb .btn-volver {
  background: var(--color-principal);
  color: white;
}

body.tresb .card h3 { color: #000; }
/* óvalos en estadísticas */
body.tresb .card p span {
  background: var(--color-principal);
  display: inline-block;
  padding: 6px 36px;   /* largo del ovalo*/
  border-radius: 45px; /* tamaño del ovalo*/
  font-size: 13px;     /* Tamaño de numero*/
  color: #fff;
  font-weight: 700;
}


/* Tabla encabezado */
body.tresb table th {
  background: var(--color-principal);
}

/* Detalle del ticket */
body.tresb .ticket-detalle {
  background: #fff;
  width: 95%;
  max-width: 750px;
  margin-top: 25px;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border-left: 5px solid var(--color-principal);
}
body.tresb .ticket-detalle h2,
body.tresb .ticket-detalle strong,
body.tresb .ticket-detalle h3 { color: var(--color-principal); }
body.tresb .documentos { border-left: 4px solid var(--color-principal); }
body.tresb .btn-volver { background: var(--color-principal); }

.logo-cliente {
  height: 55px; /* Tamaño del logo*/
  width: auto;
  margin-right: 10px;
  vertical-align: middle;
}

/* Botón volver (alineado a la derecha y pegado) */
body.tresb .acciones {
  margin-top: 25px;
  text-align: right;
  padding-right: 0; /* quita margen */
}

body.tresb .btn-volver {
  background: var(--color-principal);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-right: 0; /* pegado al borde */
}

body.tresb .btn-volver:hover {
  background: #8f0f16;
}


/*ESTILO CLIENTE LCDLC (La Casa de las Carcasas) */
body.lcdlc {
  --color-principal: #007F4F;
  --color-fondo: #f9f9f9;
}

/* Topbar y botones */
body.lcdlc .topbar h1,
body.lcdlc .btn-crear,
body.lcdlc .btn-ver,
body.lcdlc .btn-volver {
  background: var(--color-principal);
  color: white;
}

/* Tarjetas / Estadísticas */
body.lcdlc .card h3 { color: #000; }
body.lcdlc .card p span {
  background: var(--color-principal);
  padding: 6px 36px;    /* más alargado */
  border-radius: 45px;  /* más ovalado */
  font-size: 13px;      /* número más pequeño */
  color: #fff;
  font-weight: 700;
}

.logo-cliente-lcdlc {
  height: 45px;
  width: auto;
  margin-right: 10px;
  vertical-align: middle;
}

/* Tabla encabezado */
body.lcdlc table th {
  background: var(--color-principal);
}

/* Detalle del ticket */
body.lcdlc .ticket-detalle {
  background: #fff;
  width: 95%;
  max-width: 750px;
  margin-top: 25px;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border-left: 5px solid var(--color-principal);
}
body.lcdlc .ticket-detalle h2,
body.lcdlc .ticket-detalle strong,
body.lcdlc .ticket-detalle h3 { color: var(--color-principal); }
body.lcdlc .documentos { border-left: 4px solid var(--color-principal); }

/* Botón volver (alineado a la derecha) */
body.lcdlc .acciones {
  margin-top: 25px;
  text-align: right;
  padding-right: 0;
}
body.lcdlc .btn-volver {
  background: var(--color-principal);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-right: 0;
}
body.lcdlc .btn-volver:hover {
  background: #006640;
}

/* BOTÓN DE SOPORTE*/
.btn-soporte {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #090865;
  color: #fff;
  font-size: 26px;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  transition: transform 0.3s ease, background 0.3s ease;
}

.btn-soporte:hover {
  transform: scale(1.1);
  background-color: #5c637f;
}

/* ==== VENTANA DE SOPORTE ==== */
.ventana-soporte {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 25px;
  background: #fff;
  color: #333;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
  width: 280px;
  padding: 20px;
  z-index: 1999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ventana-soporte h3 {
  margin-top: 0;
  text-align: center;
  color: #000000;
}

.btn-cerrar-soporte {
  background: #131c68;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  font-weight: bold;
  transition: 0.3s;
}

.btn-cerrar-soporte:hover {
  background: #636b8d;
}

/* ==== COLORES POR EMPRESA ==== */
body.tresb .btn-soporte,
body.tresb .btn-cerrar-soporte { background: #d32f2f; }
body.lcdlc .btn-soporte,
body.lcdlc .btn-cerrar-soporte { background: #2e7d32; }
body.modelo .btn-soporte,
body.modelo .btn-cerrar-soporte { background: #B8860B; }



/* DISEÑO GENERAL DEL CHAT*/
.chat-contenedor {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  margin-top: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  max-width: 800px;
}

.chat-contenedor h3 {
  margin-bottom: 12px;
  text-align: center;
  color: #333;
}

/* Zona de mensajes */
.chat-mensajes {
  background: #fafafa;
  border-radius: 10px;
  padding: 10px;
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Mensajes */
.mensaje {
  padding: 10px 14px;
  border-radius: 15px;
  max-width: 75%;
  line-height: 1.4;
  word-wrap: break-word;
  margin-bottom: 10px;
  animation: aparecer 0.2s ease-in-out;
}

.mensaje-propio {
  background: #565bff;
  align-self: flex-end;
  text-align: right;
  color: #fff;
}

.mensaje-otro {
  background: #f0f0f0;
  align-self: flex-start;
  color: #000;
}

.mensaje .nombre {
  font-size: 13px;
  font-weight: bold;
}

.mensaje .texto {
  font-size: 14px;
}

.mensaje .hora {
  font-size: 11px;
  color: #b4adad;
  margin-top: 4px;
  text-align: right;
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Input y botones */
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.chat-input input[type="text"] {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.chat-input input[type="file"] {
  display: none;
}

.chat-input label {
  background: #888;
  color: white;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-input label:hover {
  background: #666;
}

.chat-input button {
  background: #0d0898cd;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #838180;
}

/* Vista previa de archivo */
.preview-archivo {
  font-size: 13px;
  color: #555;
  background: #eee;
  border-radius: 6px;
  padding: 5px 10px;
  margin-top: 5px;
  text-align: left;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/*COLORES POR EMPRESA*/

/* GRUPO MODELO */
body.modelo .mensaje-propio {
  background: #f1c55e;
  color: #fff;
}
body.modelo .chat-input button {
  background: #d7a32e;
}
body.modelo .chat-input button:hover {
  background: #b38722;
}
body.modelo .chat-input label {
  background: #c69d2b;
}
body.modelo .chat-input label:hover {
  background: #9b7a1d;
}

/* 3B */
body.tresb .mensaje-propio {
  background: #df5050;
  color: #fff;
  border: 1px solid #b5121b;
}
body.tresb .mensaje-otro {
  background: #f9d5d5;
}
body.tresb .chat-input button {
  background: #b5121b;
}
body.tresb .chat-input button:hover {
  background: #8E0E16;
}
body.tresb .chat-input label {
  background: #b5121b;
}
body.tresb .chat-input label:hover {
  background: #8E0E16;
}

/* LCDLC */
body.lcdlc .mensaje-propio {
  background: #007F4F;
  color: #fff;
}
body.lcdlc .mensaje-otro {
  background: #e6f7ef;
}
body.lcdlc .chat-input button {
  background: #007F4F;
}
body.lcdlc .chat-input button:hover {
  background: #006640;
}
body.lcdlc .chat-input label {
  background: #007F4F;
}
body.lcdlc .chat-input label:hover {
  background: #006640;
}

/* ARCHIVOS ADJUNTOS EN CHAT*/
.archivo {
  margin-top: 6px;
}

.archivo-link {
  color: #0a1f44;
  text-decoration: none;
  font-weight: 600;
}

.archivo-link:hover {
  text-decoration: underline;
}

.img-adjunto {
  max-width: 160px;
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  cursor: pointer;
}

/*NOTIFICACIONES */
.notificaciones {
  position: relative;
  display: inline-block;
  margin-left: 20px;
  cursor: pointer;
}

.notificaciones .icono {
  font-size: 22px;
}

.notificaciones .contador {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #e74c3c;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
}

.lista-notificaciones {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 280px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.lista-notificaciones.mostrar {
  display: block;
}

.lista-notificaciones div {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.lista-notificaciones div:hover {
  background: #f7f7f7;
}



.notificaciones {
  position: relative;
  cursor: pointer;
}

.contador {
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 12px;
  position: absolute;
  top: -5px;
  right: -5px;
}

.lista-notificaciones {
  display: none;
  position: absolute;
  top: 35px;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
  z-index: 100;
}

.notificacion {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.notificacion.no-visto {
  background-color: #e9f3ff;
}

.notificacion.visto {
  background-color: #f9f9f9;
}

.notificacion:hover {
  background-color: #dceeff;
}

/* === MODAL DE REPORTES === */
.btn-reporte {
  position: absolute;
  right: 60px;
  top: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-reporte:hover {
  background-color: #0056b3;
}

.modal-reporte {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-contenido {
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  width: 350px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-contenido h2 {
  margin-bottom: 15px;
  text-align: center;
}

.modal-contenido label {
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

.modal-contenido select,
.modal-contenido input {
  width: 100%;
  padding: 6px;
  margin-top: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.acciones-modal {
  margin-top: 15px;
  text-align: center;
}

.btn-generar, .btn-cancelar {
  margin: 5px;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-generar {
  background-color: #28a745;
  color: white;
}

.btn-cancelar {
  background-color: #dc3545;
  color: white;
}
