/* === APFUTURA osTicket - Estilo Corporativo Minimalista === */
/* Fuente segura sin @import para evitar errores */
/* ====== TABLA DE INFORMACIÓN DEL TICKET ====== */
/* Forzar el ancho del contenedor del hilo */

/* ----- Contenedor de botones Tickets / Open / Closed ----- */

/* Estilo tabla tickets */
.action-button{
  width: 100%;
}
#refresh-ticket-button{
  width: 1%;
}
#ticketTable {
  width: 100%;
  border-collapse: collapse;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  text-align: left;
  border-radius: 10px;
  overflow: hidden;
}

/* Encabezados */
#ticketTable thead th {
  background-color: #f5f7fa;
  color: #333;
  font-weight: 600;
  padding: 12px;
  border-bottom: 2px solid #e0e0e0;
  text-transform: uppercase;
  font-size: 13px;
}

/* Filas */
#ticketTable tbody tr {
  transition: background 0.2s ease;
}

#ticketTable tbody tr:nth-child(even) {
  background-color: #fafafa;
}

#ticketTable tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

#ticketTable tbody tr:hover {
  background-color: #f0f4ff;
}

/* Celdas */
#ticketTable td {
  padding: 10px 12px;
  color: #444;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: middle;
}

/* Links en la tabla */
#ticketTable a {
  color: #0056b3;
  text-decoration: none;
  font-weight: 500;
}

#ticketTable a:hover {
  text-decoration: underline;
}

/* Caption (texto "Showing 1 - 15...") */
#ticketTable caption {
  caption-side: top;
  text-align: left;
  padding: 8px 0;
  font-size: 13px;
  color: #555;
}


h1, .states {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin: 15px 0;
}

/* Botón genérico (Tickets, Open, Closed) */
h1 > a,
.states .state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 120px;            /* 👈 asegura que todos tengan mismo ancho */
  padding: 12px 20px;
  border-radius: 999px;        /* pill redondo */
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  font-size: 15px;
  font-weight: 600;
  color: #374151 !important;
  text-decoration: none !important;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: background .2s ease, border-color .2s ease, transform .1s ease;
}

/* Hover */
h1 > a:hover,
.states .state:hover {
  background: #ffffff;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

/* Activo (para Open, Closed seleccionados) */
.states .state.active {
  background: #fff5f5;
  border-color: #fcdcdc;
  color: #b91c1c;
}

/* Iconos dentro de los botones */
h1 > a .icon-refresh:before {
  content: "🔄"; /* refresh */
  font-size: 16px;
}
.states .state[href*="status=open"]::before {
  content: "🟢"; /* abierto */
  font-size: 14px;
}
.states .state[href*="status=closed"]::before {
  content: "🔒"; /* cerrado */
  font-size: 14px;
}

/* Quitar separadores e iconos sobrantes */
.states span,
.icon-file-alt:before,
.icon-file-text:before {
  display: none !important;
}

#ticketThread {
  width: 100% !important;       /* ocupa todo el ancho */
  max-width: 100% !important;   /* evita limitaciones */
  margin: 0 auto;               /* centrado dentro del padre */
}

.infoTable {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-family: Arial, sans-serif;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.infoTable th {
  text-align: left;
  background-color: #fff5f5; /* rojo super flojito */
  font-weight: bold;
  padding: 10px;
  font-size: 14px;
}

.infoTable td {
  padding: 10px;
  font-size: 14px;
  text-align: left; /* Alineado a la izquierda */
  color: #333;
  border-bottom: 1px solid #eee;
}

.infoTable tr:last-child td {
  border-bottom: none;
}

/* ====== CONTENEDOR DE MENSAJES (CHAT) ====== */
#ticketThread {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Entrada general */
.thread-entry {
  display: flex;
  flex-direction: column;   /* Avatar arriba, bocadillo debajo */
  align-items: flex-start;
  gap: 6px;
  font-family: Arial, sans-serif;
}

/* Avatar */
.thread-entry .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 4px;
}

/* Texto de cabecera (usuario + fecha) */
.thread-entry .header {
  font-size: 13px;
  margin-bottom: 5px;
  color: #666;
}
.thread-entry .header b {
  color: #000;
}

/* ====== BURBUJAS DE MENSAJE ====== */
.thread-body {
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px 18px;
  width: 92%;              /* más alargadas */
  text-align: left;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  box-sizing: border-box;
}

/* Piquito bocadillo izquierda */
.thread-body:before {
  content: "";
  position: absolute;
  left: -16px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 16px solid #e5e7eb;
}
.thread-body:after {
  content: "";
  position: absolute;
  left: -15px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 15px solid #f7f8fa;
}
.thread-body a{
  text-align: left;
}

/* Burbujas de respuesta (derecha) */
.thread-entry.response {
  flex-direction: column;   /* Avatar arriba, bocadillo debajo */
  align-items: flex-end;
}
.thread-entry.response .thread-body {
  background: #fff5f5;
  border: 1px solid #fcdcdc;
}
.thread-entry.response .thread-body:before {
  content: "";
  position: absolute;
  right: -16px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 16px solid #fcdcdc;
}
.thread-entry.response .thread-body:after {
  content: "";
  position: absolute;
  right: -15px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 15px solid #fff5f5;
}

/* ====== EVENTOS (Closed by, System, etc.) ====== */
.thread-event {
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
}
.thread-event .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  vertical-align: middle;
}
.thread-event b {
  color: #000;
}
.thread-event .type-icon {
  color: #888;
}


body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background-color: #f2f8fc;
  color: #2e2e2e;
  margin: 0;
  padding: 0;
}

/* HEADER */
#header {
  background: #fff;
  border-bottom: none;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#header #logo img {
  max-height: 125px;
}

#header a {
  color: #d60000;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

#header a:hover {
  text-decoration: underline;
}

/* MENÚ HORIZONTAL */
#nav {
  background: transparent;
  border: none;
  padding: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

#nav a {
  background: #fff;
  color: #d60000;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: all 0.3s ease;
}

#nav a:hover,
#nav .active {
  background: #d60000;
  color: #fff;
}

/* CAJA CENTRAL */
#content {
  background: #fff;
  max-width: 650px;
  margin: 3rem auto;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  text-align: center;
}

#content h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #222;
}

#content p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}

/* BOTONES ROJOS GRANDES */
a.button, .button, input.button {
  display: block;
  background-color: #d60000;
  color: white !important;
  font-weight: 600;
  padding: 14px;
  border-radius: 8px;
  margin: 0.6rem auto;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

a.button:hover, .button:hover, input.button:hover {
  background-color: #a50000;
}

/* FOOTER */
#footer {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  background: transparent;
  padding: 1.5rem;
}

/* OCULTAR mensaje "Please reload this page" */
div#osticket-misc,
div#osticket-misc * {
  display: none !important;
  visibility: hidden !important;
}

/* ===== FIX: separadores que se solapan ===== */
#content hr,
.form_table hr,
.dialog hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  height: 0;
  margin: 24px 0;
  clear: both;
}

/* ===== FIX: ancho y espaciado del formulario ===== */
#ticketForm,
form[action*="open.php"],
.form_table {
  max-width: 720px;
  margin: 0 auto;
}

.form_table tr,
.form_table .field {
  display: block;
  margin-bottom: 12px;
}

.form_table input[type="text"],
.form_table input[type="email"],
.form_table input[type="tel"],
.form_table select {
  width: 100%;
  max-width: 460px;            /* evita desbordes */
  box-sizing: border-box;
}

/* Teléfono + Ext en línea con espacio */
.form_table .inline {
  display: inline-flex;
  gap: 8px;
}

/* ===== FIX: editor de descripción visible ===== */
/* osTicket puede usar Redactor o un textarea simple; cubrimos ambos */
.redactor-box,
.richtext,
textarea[name="message"],
textarea#message {
  display: block !important;
  width: 100% !important;
  min-height: 220px !important;
  border: 1px solid #dcdfe4 !important;
  background: #fff !important;
  border-radius: 10px !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  color: #222 !important;
}

.redactor-box { box-shadow: none !important; }
.redactor-editor { min-height: 200px !important; }

/* ===== Dropzone de adjuntos coherente ===== */
#filedrop, .dropzone, .attachments {
  border: 2px dashed #dcdfe4 !important;
  background: #fafafa !important;
  border-radius: 10px !important;
}

/* Evitar que algo tape los hr */
#content { overflow: visible; }

/* Estrella de requeridos */
.required { color: #d00; }

/* Separar texto y botones en la caja central */
#content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#content .button {
  margin-top: 12px; /* separa cada botón */
}

#content p {
  margin-bottom: 20px; /* espacio debajo del párrafo */
  max-width: 650px;
  text-align: center;
}

/* --- HOME: poner los botones debajo del texto --- */
#landing_page,
#content { text-align: center; }

/* Quita floats de los botones por si vienen a la derecha */
#landing_page .pull-right,
#landing_page .flush-right,
#landing_page .action-button,
#content .pull-right,
#content .flush-right {
  float: none !important;
}

/* Botones grandes centrados y en columna */
#landing_page .button,
#content .button,
#landing_page a.button,
#content a.button {
  display: block;
  clear: both;                 /* fuerza salto de línea antes del botón */
  width: 320px;                /* ancho del botón */
  margin: 14px auto 0 !important;  /* centrado y separación del texto */
}

/* Espacio bajo los párrafos para que no “choquen” con los botones */
#landing_page p,
#content p {
  margin-bottom: 18px;
}

/* --- Tamaño del logo APFUTURA --- */
#header #logo img {
  width: 500px;   /* AJUSTA AQUÍ el ancho del logo */
  height: auto;
  max-width: 100%;
}

/* Fondo para la caja de usuario/inicio de sesión */
#header .pull-right.flush-right {
  background: #fcf7e1; /* color de fondo */
  padding: 8px 14px; /* espacio interno */
  border-radius: 8px; /* bordes redondeados */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* sombra suave */
  display: inline-block;
}

#header .pull-right.flush-right p {
  margin: 0;
  font-size: 0.9rem;
}

#header .pull-right.flush-right a {
  color: #d60000; /* color del link */
  font-weight: 600;
}

#header .pull-right.flush-right a:hover {
  text-decoration: underline;
}
/* Quitar viñetas por defecto y añadir separador con espacio */
#nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px; /* espacio entre elementos */
}

#nav li {
  list-style: none;
  position: relative;
  padding-left: 15px; /* espacio para el separador */
}

/* Separador como un punto rojo */
#nav li:not(:first-child)::before {
  content: "•";
  color: #444;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* Eliminar los puntos del menú de navegación */
#nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

#nav li {
  list-style: none;
}

#nav li::before {
  content: none !important;
}

/* Caja de contenido más ancha y centrada para formularios */
#content {
  max-width: 900px;              /* Aumenta el ancho máximo */
  margin: 2rem auto;              /* Centrado con espacio arriba y abajo */
  padding: 2.5rem 3rem;           /* Más espacio interno */
  background: #fff;               /* Fondo blanco */
  border-radius: 20px;            /* Bordes redondeados */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); /* Sombra suave */
}

/* Centrar título y descripción */
#content h1, 
#content p {
  text-align: center;
}

/* Ajustar el ancho del formulario dentro */
#ticketForm, 
.form_table {
  max-width: 700px;               /* Ajusta el ancho del formulario */
  margin: 0 auto;                 /* Centrado */
}

/* Campos de entrada adaptables */
.form_table input[type="text"],
.form_table input[type="email"],
.form_table input[type="tel"],
.form_table select,
.form_table textarea {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Editor de texto enriquecido adaptado */
.redactor-box, .richtext, textarea[name="message"], textarea#message {
  width: 100% !important;
  min-height: 220px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

/* ====== Formulario: ancho y layout consistente ====== */
#ticketForm,
form[action*="open.php"],
.form_table {
  max-width: 820px;
  margin: 0 auto;
}

.form_table {
  border: 0;
}

.form_table tr,
.form_table .field {
  display: block;
  margin: 0 0 16px;
}

/* Etiquetas arriba, claras */
.form_table th,
.form_table label {
  display: block;
  text-align: left;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}

/* Inputs a ancho completo y con padding */
.form_table input[type="text"],
.form_table input[type="email"],
.form_table input[type="tel"],
.form_table input[type="number"],
.form_table select,
.form_table textarea {
  width: 100% !important;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dcdfe4;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  outline: none;
}

.form_table input:focus,
.form_table select:focus,
.form_table textarea:focus {
  border-color: #d60000;
  box-shadow: 0 0 0 3px rgba(214,0,0,0.08);
}

/* ====== Quitar “Rich text editor” y dejar solo el área de descripción ====== */
/* oculta el legend/título del fieldset del editor */
#ticketForm fieldset > legend {
  display: none !important;
}

/* asegúrate de que el editor/textarea grande sea visible y con borde bonito */
#ticketForm .redactor-box,
#ticketForm .richtext,
#ticketForm textarea[name="message"],
#ticketForm textarea#message {
  display: block !important;
  width: 100% !important;
  min-height: 240px !important;
  border: 1px solid #dcdfe4 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  background: #fff !important;
  color: #222 !important;
  box-shadow: none !important;
}

/* si aparece un “doble marco/grupo”, suavízalo */
#ticketForm fieldset {
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
#ticketForm fieldset + .attachments {
  margin-top: 14px;
}

/* ====== Asunto (Descripción breve) más claro y sin que “choque” ====== */
#ticketForm input[name="subject"],
#ticketForm input[name="topic"],
#ticketForm input[id*="subject"] {
  margin-bottom: 10px;
}

/* separa claramente el textarea del texto de ayuda */
#ticketForm textarea + .hint,
#ticketForm .redactor-box + .hint {
  margin-top: 8px;
  color: #6b7280;
}

/* ====== Adjuntos más discretos ====== */
#filedrop, .dropzone, .attachments {
  border: 2px dashed #dcdfe4 !important;
  background: #fafafa !important;
  border-radius: 10px !important;
  padding: 12px !important;
}

/* ====== Captcha alineado y limpio ====== */
#ticketForm .captcha,
#ticketForm .captcha + .field {
  display: flex;
  align-items: center;
  gap: 10px;
}
#ticketForm .captcha img { border-radius: 6px; }
#ticketForm .captcha input[type="text"] {
  width: 160px !important;
  margin: 0;
}

/* ====== Separadores finos y sin solapes ====== */
#content hr,
.form_table hr,
.dialog hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  height: 0;
  margin: 24px 0;
  clear: both;
}

/* Asterisco de obligatorios consistente */
.required { color: #d60000; font-weight: 700; }

/* Ocultar el campo de descripción duplicado */
#ticketForm input[name="subject"],
#ticketForm input[id*="descripcion"],
#ticketForm input[id*="description"] {
  display: none !important;
}

#ticketForm label[for*="descripcion"],
#ticketForm label[for*="description"] {
  display: none !important;
}

/* 1) Ocultar el campo “Descripción” de arriba (texto corto) */
#ticketForm .form_table tr:has(input[name="descripcion"]),
#ticketForm .form_table tr:has(input[id*="descripcion"]),
#ticketForm .form_table tr:has(input[name="description"]),
#ticketForm .form_table tr:has(input[id*="description"]),
#ticketForm .form_table tr:has(input[name="subject"]) {
  display: none !important;
}

/* 2) Mantener SOLO el editor: si hay editor Redactor, oculta el textarea de abajo */
#ticketForm:has(.redactor-box) textarea[name="message"],
#ticketForm:has(.redactor-box) textarea#message {
  display: none !important;
}

/* 3) Quitar el texto “Rich text editor” y poner un rótulo claro sobre el editor */
#ticketForm fieldset > legend { display: none !important; }
#ticketForm .redactor-box::before {
  content: "Descripción de la incidencia *";
  display: block;
  font-weight: 700;
  color: #222;
  margin: 6px 0 8px;
}

/* 4) Apariencia del área de escritura */
#ticketForm .redactor-box,
#ticketForm .richtext {
  border: 1px solid #dcdfe4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  min-height: 260px !important;
}
#ticketForm .redactor-editor { min-height: 220px !important; }

/* 5) Pistas de ayuda: debajo y discretas */
#ticketForm .redactor-box + .hint,
#ticketForm textarea#message + .hint {
  margin-top: 8px;
  color: #6b7280;
}

/* Ocultar el textarea de mensaje cuando está activo el editor rico */
#ticketForm .redactor-box ~ textarea#message,
#ticketForm .redactor-box ~ textarea[name="message"],
#ticketForm textarea#message.redactor_hidden,
#ticketForm textarea[name="message"].redactor_hidden {
  display: none !important;
}

/* Asegura que la caja del editor sea la que se vea */
#ticketForm .redactor-box,
#ticketForm .richtext {
  display: block !important;
}

/* Opcional: quita el texto de ayuda intermedio para que no quede hueco */
#ticketForm .redactor-box + .hint {
  margin-top: 8px;
  color: #6b7280;
}

/* Oculta el textarea original que queda detrás del editor */
.redactor-box + textarea,
.richtext + textarea,
.note-editor + textarea,
.tinymce + textarea {
  display: none !important;
}

/* ==== OCULTAR textarea duplicado del mensaje cuando hay editor ==== */
/* 1) Si existe el contenedor del editor (Redactor), oculta cualquier textarea de mensaje */
#ticketForm:has(.redactor-box) textarea#message,
#ticketForm:has(.redactor-box) textarea[name="message"],
#ticketForm .redactor-box ~ textarea#message,
#ticketForm .redactor-box ~ textarea[name="message"],
#ticketForm .redactor-box textarea,
#ticketForm textarea#message.redactor_hidden,
#ticketForm textarea[name="message"].redactor_hidden,
#ticketForm textarea#message.richtext,
#ticketForm textarea[name="message"].richtext,
#ticketForm textarea#message.draft,
#ticketForm textarea[name="message"].draft {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* 2) Asegura que el editor visible tenga altura y borde correctos */
#ticketForm .redactor-box,
#ticketForm .richtext {
  display: block !important;
  border: 1px solid #dcdfe4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  min-height: 260px !important;
}
#ticketForm .redactor-editor { min-height: 220px !important; }

/* 3) Quita el texto "Rich text editor" y pon un título claro */
#ticketForm fieldset > legend { display: none !important; }
#ticketForm .redactor-box::before{
  content:"Descripción de la incidencia *";
  display:block;
  font-weight:700;
  color:#222;
  margin:6px 0 8px;
}

/* === Caja de usuario / iniciar sesión — estilo tarjeta elegante === */
#header .pull-right.flush-right{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #F5DBD5;                          /* tarjeta blanca */
  border: 1px solid #eee;                       /* borde sutil */
  border-radius: 12px;                          /* bordes suaves */
  box-shadow: 0 6px 20px rgba(0,0,0,.06);       /* sombra suave */
}

/* Icono de usuario a la izquierda */
#header .pull-right.flush-right::before{
  content: "";
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #d60000;
  box-shadow: inset 0 0 0 3px #fff;
  background:
    radial-gradient(circle at 50% 35%, #d60000 0 28%, transparent 29%),
    radial-gradient(circle at 50% 75%, #d60000 0 40%, transparent 41%);
  /* ^ cabeza + cuerpo simples con CSS, sin iconos externos */
}

#header .pull-right.flush-right p{
  margin: 0;
  line-height: 1.2;
  font-size: 14px;
  color: #333;
}

/* Enlace “Iniciar sesión” con marca corporativa */
#header .pull-right.flush-right a{
  color: #d60000;
  font-weight: 700;
  text-decoration: none;
}
#header .pull-right.flush-right a:hover{
  text-decoration: underline;
}

/* Separador vertical entre texto y banderas */
#header .pull-right.flush-right p + p{
  border-left: 1px solid #eee;
  padding-left: 12px;
  margin-left: 4px;
}

/* Banderas alineadas y con espaciado */
#header .pull-right.flush-right .flag{
  margin-right: 6px;
  transform: translateY(1px);
}

/* Móvil: que no se corte ni desborde */
@media (max-width: 640px){
  #header .pull-right.flush-right{
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
  }
  #header .pull-right.flush-right p{
    font-size: 13px;
  }
}

/* === Botón para iniciar sesión como agente === */
#header .agent-login-btn {
    display: inline-block;
    background-color: #d60000;
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 6px;}

#header .agent-login-btn:hover {
  background-color: #a50000;
}

/* ====== Responsive ====== */

/* Tablets y abajo */
@media (max-width: 992px){
  #header { padding: .75rem 1rem; }
  #header #logo img { max-height: 90px; width: auto; }
  #content { max-width: 760px; padding: 2rem; }
  #ticketForm, .form_table { max-width: 640px; }
}

/* Móviles grandes */
@media (max-width: 768px){
  /* Header apilado y centrado */
  #header {
    flex-direction: column;
    gap: .75rem;
    align-items: center;
    text-align: center;
  }
  #header .pull-right.flush-right{
    width: 100%;
    justify-content: center;
  }
  #header #logo { order: -1; } /* logo arriba */
  #header #logo img { max-height: 70px; }

  /* Menú: pills con scroll horizontal */
  #nav {
    gap: 8px;
    padding: .5rem .75rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  #nav a {
    display: inline-block;
    font-size: .95rem;
    padding: .45rem .9rem;
  }

  /* Caja central y textos */
  #content {
    margin: 1.25rem auto;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    max-width: 92%;
  }
  #content h1 { font-size: 1.35rem; }
  #content p  { font-size: .95rem; }

  /* Botones grandes: 100% ancho cómodo */
  #landing_page .button,
  #content .button,
  #landing_page a.button,
  #content a.button {
    width: 100%;
    max-width: 520px;
    margin: 10px auto 0 !important;
    padding: 14px;
    font-size: 1rem;
    border-radius: 10px;
  }

  /* Formulario */
  #ticketForm, .form_table { max-width: 100%; }
  .form_table tr, .form_table .field { margin-bottom: 14px; }
  .form_table input[type="text"],
  .form_table input[type="email"],
  .form_table input[type="tel"],
  .form_table input[type="number"],
  .form_table select,
  .form_table textarea {
    font-size: 16px;              /* evita zoom iOS */
    padding: 12px;
    border-radius: 10px;
  }

  /* Editor enriquecido */
  #ticketForm .redactor-box, #ticketForm .richtext {
    min-height: 220px !important;
  }
  #ticketForm .redactor-editor { min-height: 180px !important; }

  /* Adjuntos y captcha en columna */
  #filedrop, .dropzone, .attachments {
    padding: 12px !important;
  }
  #ticketForm .captcha,
  #ticketForm .captcha + .field {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  #ticketForm .captcha input[type="text"] {
    width: 100% !important;
    max-width: 220px;
  }

  /* Bloque login (usuario/agente) */
  #header .pull-right.flush-right {
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
  }
  .login-btn {
    width: 100%;
    max-width: 260px;
    margin-left: 0;
  }
}

/* Móviles pequeños */
@media (max-width: 480px){
  #header #logo img { max-height: 58px; }
  #nav a { font-size: .9rem; padding: .4rem .8rem; }
  #content { padding: 1rem .85rem; border-radius: 14px; }
  #content h1 { font-size: 1.2rem; }
  .login-btn { font-size: .95rem; padding: 8px 12px; }
}

