/* ==========================================================================
   LOGOSOFT 2026 — capa de diseño para el portal de clientes (osTicket)
   --------------------------------------------------------------------------
   Toma el sistema de diseño del rediseño del sitio (logosoft2026):
   crema + tinta negra, naranja como CTA, azul como acento, Anton para
   titulares, Inter para texto y JetBrains Mono para números de ticket.

   Se carga DESPUES de theme.css / thread.css / redactor.css, por eso casi
   nunca hace falta !important: gana por orden de aparición.
   Para cambiar la paleta alcanza con tocar el bloque :root de aquí abajo.
   ========================================================================== */

:root {
    /* ---------- COLORES (mismos nombres que el sitio 2026) ---------- */
    --color-bg:        #f3f1ec;          /* fondo principal (crema) */
    --color-bg-dark:   #111111;          /* secciones invertidas / pie */
    --color-surface:   #ffffff;          /* hojas de contenido */
    --color-text:      #111111;          /* texto principal */
    --color-text-soft: #555555;          /* texto secundario */
    --color-accent:    #ff5b22;          /* naranja vibrante (CTA, hover) */
    --color-accent-2:  #2d4cff;          /* azul (acento secundario) */
    --color-line:      rgba(0,0,0,0.12); /* hairlines */
    --color-ok:        #1f9d55;
    --color-danger:    #c62828;

    /* ---------- FUENTES ---------- */
    --font-display: 'Anton', 'Arial Black', sans-serif;
    --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;

    /* ---------- GEOMETRIA ---------- */
    --radius:    8px;
    --radius-lg: 14px;
    --maxw:      1140px;
    --ease:      cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   1. BASE
   ========================================================================== */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    background: var(--color-bg);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body, input, select, textarea, button {
    font-family: var(--font-body);
    color: var(--color-text);
}

a, .link {
    color: var(--color-accent-2);
    text-decoration: none;
    border-bottom: 0;
    transition: color .18s var(--ease);
}
a:hover, .link:hover {
    color: var(--color-accent);
    border-bottom: 0;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--color-accent-2);
    outline-offset: 2px;
}

hr {
    border: 0;
    border-top: 1px solid var(--color-line);
    margin: 24px 0;
}

::selection { background: var(--color-accent); color: #fff; }

/* ==========================================================================
   2. ESTRUCTURA — contenedor, cabecera, navegación, contenido, pie
   ========================================================================== */
#container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
    box-sizing: border-box;
    background: transparent;
    box-shadow: none;
    flex: 1 0 auto;
}

/* --- Cabecera --- */
#header {
    height: auto;
    padding: 26px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    flex-wrap: wrap;
}
#header #logo {
    float: none;
    order: 1;
    height: auto;
    display: inline-flex;
    align-items: center;
}
#header #logo img { max-height: 54px; max-width: 300px; }
#header .pull-right { float: none; order: 2; }

#header .ls-usernav {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 14px;
    width: auto;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}
#header .ls-usernav a { color: var(--color-text); }
#header .ls-usernav a:hover { color: var(--color-accent); }
#header .ls-usernav .ls-who {
    font-weight: 600;
    color: var(--color-text);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#header .ls-usernav .ls-count {
    font-family: var(--font-mono);
    font-weight: 600;
}
#header .ls-usernav .ls-pill {
    display: inline-block;
    padding: 7px 15px;
    line-height: 1;
    border: 1.5px solid var(--color-text);
    border-radius: 999px;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
#header .ls-usernav .ls-pill:hover {
    background: var(--color-text);
    color: #fff;
}
#header .ls-langs { margin: 6px 0 0; padding: 0; width: auto; text-align: right; }
#header .ls-langs .flag { margin-left: 4px; }

/* --- Navegación --- */
#nav {
    margin: 0;
    padding: 0 0 18px;
    height: auto;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--color-line);
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    white-space: normal;
}
#nav li { display: block; margin: 0; padding: 0; }
#nav li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: auto;
    line-height: 1;
    padding: 11px 17px;
    margin: 0;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background: none;
    background-image: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--color-text-soft);
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.rtl #nav li a { padding: 11px 17px; margin: 0; }
#nav li a:hover {
    background: rgba(17,17,17,.06);
    color: var(--color-text);
}
#nav li a.active {
    background: var(--color-text);
    color: #fff;
}
#nav li a.active:hover { background: var(--color-accent); color: #fff; }

/* fuera los sprites PNG del menú (theme.css los aplica con mas especificidad) */
#nav li a.home, #nav li a.kb, #nav li a.new,
#nav li a.status, #nav li a.tickets {
    background-image: none;
    background-repeat: no-repeat;
}

/* iconos del menú con FontAwesome (ya cargado por osTicket) */
#nav li a:before {
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    font-size: 13px;
    letter-spacing: 0;
    line-height: 1;
}
#nav li a.home:before    { content: "\f015"; }
#nav li a.kb:before      { content: "\f02d"; }
#nav li a.new:before     { content: "\f067"; }
#nav li a.status:before  { content: "\f002"; }
#nav li a.tickets:before { content: "\f0f6"; }

/* --- Hoja de contenido --- */
#content {
    margin: 24px 0 52px;
    padding: clamp(22px, 3.2vw, 40px);
    min-height: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
}

/* --- Pie --- */
#footer {
    flex-shrink: 0;
    background: var(--color-bg-dark);
    color: rgba(255,255,255,.55);
    text-align: left;
    font-size: 12px;
    letter-spacing: .04em;
    padding: 34px clamp(16px, 4vw, 32px);
}
.ls-footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
}
#footer p { margin: 0; }
#footer a { color: rgba(255,255,255,.75); }
#footer a:hover { color: var(--color-accent); }
#footer #poweredBy {
    display: inline-block;
    width: auto;
    height: auto;
    margin: 0;
    background: none;
    text-indent: 0;
    font-size: 11px;
    opacity: .6;
}

/* ==========================================================================
   3. TIPOGRAFIA
   ========================================================================== */
h1 {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.04;
    letter-spacing: .005em;
    color: var(--color-text);
    margin: 0 0 18px;
}
#landing_page .thread-body h1 {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: .98;
    letter-spacing: .005em;
    margin: 0 0 14px;
}
h1 a { color: inherit; }
h1 a:hover { color: var(--color-accent); }
h1 small, h1 .states, h1 .pull-right {
    font-family: var(--font-body);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
h1 small { font-family: var(--font-mono); font-size: .8rem; color: var(--color-text-soft); }

h2, .subject {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -.01em;
    color: var(--color-text);
}
h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -.005em;
}
h4 { font-family: var(--font-body); font-weight: 600; }

.faded, em { color: var(--color-text-soft); }
.error { color: var(--color-danger); }

/* etiqueta de sección (mayúsculas finitas), estilo del sitio 2026 */
.form-header h3,
.sidebar section .header,
#ticketTable caption,
.infoTable .headline,
#reply h2 {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}

/* ==========================================================================
   4. BOTONES
   ========================================================================== */
.button, .button:visited,
input[type=submit], input[type=button], input[type=reset], button[type=submit],
.btn, a.btn, input.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1;
    padding: 13px 22px;
    max-width: none;
    border: 1.5px solid var(--color-text);
    border-radius: 999px;
    background: var(--color-text);
    color: #fff;
    text-align: center;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color .2s var(--ease), border-color .2s var(--ease),
                color .2s var(--ease), transform .15s var(--ease);
}
.button:hover,
input[type=submit]:hover, input[type=button]:hover, input[type=reset]:hover,
button[type=submit]:hover, .btn:hover, input.btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    transform: translateY(-1px);
}
.button:active, input[type=submit]:active, .btn:active { top: 0; transform: translateY(0); }

/* CTA principal (naranja): "Abrir un nuevo ticket" */
.blue.button, .blue.button:visited {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.blue.button:hover {
    background: var(--color-text);
    border-color: var(--color-text);
}
/* Acción secundaria (tinta) */
.green.button, .green.button:visited {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}
.green.button:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* Acciones secundarias del formulario: contorno, sin relleno */
input[type=reset], input[type=button] {
    background: transparent;
    border-color: var(--color-line);
    color: var(--color-text);
}
input[type=reset]:hover, input[type=button]:hover {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}

/* Acción principal del formulario de alta (naranja, como el CTA del sitio) */
#ticketForm .buttons input[type=submit],
#clientLogin input[type=submit] {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
#ticketForm .buttons input[type=submit]:hover,
#clientLogin input[type=submit]:hover {
    background: var(--color-text);
    border-color: var(--color-text);
}
.buttons input, .buttons .button { margin: 0 5px; }

/* Botón fantasma de las acciones de ticket (Imprimir / Editar) */
.action-button,
.image-hover a.action-button {
    background: transparent !important;
    background-image: none !important;
    border: 1.5px solid var(--color-line);
    border-radius: 999px;
    color: var(--color-text) !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1;
    padding: 8px 14px;
    margin-left: 6px;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.action-button span, .action-button a { color: var(--color-text) !important; float: none; }
.action-button:hover {
    background: var(--color-text) !important;
    border-color: var(--color-text);
    color: #fff !important;
}
.action-button:hover span, .action-button:hover a { color: #fff !important; }

/* ==========================================================================
   5. FORMULARIOS
   ========================================================================== */
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=tel], input[type=url], input[type=search], input[type=date],
select, textarea {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 11px 13px;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
select { padding: 10px 13px; }
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
input[type=number]:focus, input[type=tel]:focus, input[type=search]:focus,
select:focus, textarea:focus {
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(255,91,34,.18);
    outline: none;
}
input[type=checkbox], input[type=radio] { accent-color: var(--color-accent); }
::placeholder { color: #9a958c; }

label { font-weight: 500; }
label.required, span.required { font-weight: 600; }

/* Formulario de apertura de ticket */
#ticketForm > table,
#ticketInfo,
#content table[width="800"] { width: 100% !important; }
#ticketForm > table td, #ticketForm > table td + td { width: auto; }
#ticketForm div label, #clientLogin div label { display: block; }
#ticketForm div input, #ticketForm div textarea,
#clientLogin div input, #clientLogin div textarea {
    border: 1px solid var(--color-line);
    background: var(--color-surface);
}
#ticketForm textarea, #reply textarea, textarea.richtext {
    width: 100% !important;
    min-height: 170px;
}
#ticketForm input[type=text], #ticketForm input[type=email],
#ticketForm input[type=tel], #ticketForm select {
    width: 100%;
    max-width: 560px;
}
#ticketForm input[name$="-ext"],
#ticketForm input#captcha,
#ticketForm input[size="5"], #ticketForm input[size="6"] { width: 7em; }
#ticketForm input[type=tel] { max-width: 280px; }
#ticketForm hr { margin: 26px 0 4px; }
#ticketForm .form-header { margin-bottom: .6em; }
#ticketForm em { font-size: 13px; color: var(--color-text-soft); }
#ticketForm .captchaRow .captcha { border-radius: var(--radius); overflow: hidden; }
#ticketForm .buttons { padding-top: 8px; }
#ticketForm .buttons input, #ticketForm .buttons .button { margin: 0 4px; }
div.section-break { border-top: 1px solid var(--color-line); }

/* Editor enriquecido (Redactor) */
.redactor-box {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    overflow: hidden;
}
.redactor-editor { font-family: var(--font-body) !important; font-size: 15px !important; }
.redactor-toolbar { background: var(--color-bg) !important; border-bottom: 1px solid var(--color-line); }

/* Select2 */
.select2-container .select2-choice {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    background-image: none;
    box-shadow: none;
    height: auto;
    padding: 9px 12px;
    line-height: 1.4;
    color: var(--color-text);
}
.select2-drop { border-color: var(--color-line); border-radius: var(--radius); }

/* Adjuntos (filedrop) */
.freetext-files, .filedrop {
    border: 1px dashed var(--color-line);
    border-radius: var(--radius);
    background: var(--color-bg);
}

/* ==========================================================================
   6. AVISOS Y MENSAJES
   ========================================================================== */
#msg_notice, #msg_warning, #msg_error, #msg_info,
.notice_bar, .warning_bar, .error_bar, .warning-banner {
    height: auto;
    line-height: 1.55;
    padding: 14px 18px;
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--color-text);
    background-image: none;
    background-color: var(--color-surface);
    border: 1px solid var(--color-line);
    border-left: 4px solid var(--color-text);
    border-radius: var(--radius);
}
#msg_notice, #msg_warning, #msg_error, #msg_info { margin: 0 0 20px; }
#msg_notice, .notice_bar  { border-left-color: var(--color-ok);       background-color: rgba(31,157,85,.06); }
#msg_warning, .warning_bar, .warning-banner { border-left-color: var(--color-accent); background-color: rgba(255,91,34,.07); }
#msg_error, .error_bar    { border-left-color: var(--color-danger);   background-color: rgba(198,40,40,.05); }
#msg_info                 { border-left-color: var(--color-accent-2); background-color: rgba(45,76,255,.05); border-color: var(--color-line); }
.warning { background: rgba(255,91,34,.07); font-style: normal; }
.warning strong { color: var(--color-accent); }
.error input { border: 1px solid var(--color-danger); }

/* ==========================================================================
   7. PORTADA, BARRA LATERAL Y BASE DE CONOCIMIENTO
   ========================================================================== */
.main-content { width: auto; overflow: hidden; }

.sidebar {
    float: right;
    width: 280px;
    margin: 0 0 26px 30px;
}
.rtl .sidebar { float: left; margin: 0 30px 26px 0; }
.sidebar .front-page-button p { margin: 0 0 10px; }
.sidebar .button { padding: 15px 18px; }
.sidebar .content {
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-bg);
}
.sidebar section .header { margin-bottom: 10px; }
.sidebar section > div:not(.header) {
    padding: 8px 0;
    border-top: 1px solid var(--color-line);
    font-size: 14px;
}
.sidebar section > div:not(.header) a { color: var(--color-text); }
.sidebar section > div:not(.header) a:hover { color: var(--color-accent); }

/* Buscador de la portada */
.search-form { padding: 0 0 26px; }
.search-form form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form .search, .searchbar .search {
    flex: 1 1 240px;
    width: auto;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    padding: 14px 20px;
    font-size: 15px;
    box-shadow: none;
}
.search-form .button { flex: 0 0 auto; }

#landing_page .thread-body {
    padding: 0;
    background: transparent;
    font-size: 15px !important;
    color: var(--color-text);
    font-family: var(--font-body);
}
#landing_page .thread-body p { color: var(--color-text-soft); font-size: 16px; }

/* Categorías destacadas (tarjetas) */
.featured-category {
    box-sizing: border-box;
    width: calc(50% - 14px);
    margin: 14px 10px 0 0;
    padding: 22px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    vertical-align: top;
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.featured-category:hover { border-color: var(--color-text); transform: translateY(-2px); }
.featured-category i { color: var(--color-accent); text-shadow: none; }
.category-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
    margin-left: 8px;
}
.article-headline { margin-top: 12px; }
.article-title { font-weight: 600; }
.article-title a { color: var(--color-text); }
.article-title a:hover { color: var(--color-accent); }
.article-teaser { color: var(--color-text-soft); font-size: 14px; }
.faq-content .article-title {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-top: 4px;
}

/* Listado de categorías de la KB */
#kb { padding: 0; margin: 0; }
#kb > li {
    background: none;
    border-bottom: 1px solid var(--color-line);
    padding: 20px 0;
}
#kb > li:last-child { border-bottom: 0; }
#kb > li > i {
    background-image: none;
    width: 32px;
    height: 32px;
    font-family: FontAwesome;
    font-style: normal;
    font-size: 22px;
    line-height: 32px;
    color: var(--color-accent);
    text-align: center;
}
#kb > li > i:before { content: "\f07b"; }
#kb > li h4 a { font-size: 1.05rem; font-weight: 600; color: var(--color-text); }
#kb > li h4 a:hover { color: var(--color-accent); }
#kb > li h4 span { color: var(--color-text-soft); font-weight: 500; }

#faq ol { border-top: 1px solid var(--color-line); }
#faq ol li a {
    background: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-line);
    color: var(--color-text);
    line-height: 1.5;
}
#faq ol li a:hover { background-color: rgba(255,91,34,.05); color: var(--color-accent); }
#faq .article-meta {
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--color-text-soft);
}

#kb-search { padding: 0 0 18px; }
#kb-search #query, #kb-search #cid { width: 240px; border-radius: 999px; padding: 12px 18px; }
#kb-search #topic-id { width: 100%; max-width: 500px; }
#kb-search #breadcrumbs {
    color: var(--color-text-soft);
    font-size: 13px;
    letter-spacing: .04em;
}

/* ==========================================================================
   8. LISTA DE TICKETS
   ========================================================================== */
.search.well {
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 18px;
    margin: 0 0 26px;
}
#ticketSearchForm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#ticketSearchForm input[type=text] { flex: 1 1 220px; border-radius: 999px; padding: 11px 18px; }
#ticketSearchForm .pull-right {
    float: none;
    margin-left: auto;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* filtros abierto / cerrado como píldoras */
h1 .states { font-size: 0; }
h1 .states small { font-size: 12px; }
h1 .states i, h1 .states span[style*="lightgray"] { display: none; }
h1 .states a.state {
    display: inline-block;
    margin-left: 6px;
    padding: 7px 14px;
    border: 1.5px solid var(--color-line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}
h1 .states a.state:hover { border-color: var(--color-text); color: var(--color-text); }
h1 .states a.state.active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
    font-weight: 600;
}

#ticketTable {
    width: 100% !important;
    border: 0;
    border-collapse: collapse;
}
#ticketTable caption {
    background: transparent;
    border: 0;
    padding: 0 0 12px;
    text-align: left;
}
#ticketTable th {
    height: auto;
    line-height: 1.4;
    background: transparent;
    border: 0;
    border-bottom: 1.5px solid var(--color-text);
    padding: 0 10px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}
#ticketTable th a { color: var(--color-text); }
#ticketTable th a:hover { color: var(--color-accent); }
#ticketTable th i.icon-sort { color: var(--color-text-soft); font-size: 10px; }
#ticketTable td {
    border: 0;
    border-bottom: 1px solid var(--color-line);
    padding: 15px 10px;
    vertical-align: middle;
}
#ticketTable tr.alt td { background: transparent; }
#ticketTable tbody tr:hover td { background: rgba(255,91,34,.05); }
#ticketTable td .Icon {
    background-image: none;
    padding-left: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}
#ticketTable td .Icon:hover { color: var(--color-accent); }
#ticketTable td .link, #ticketTable td .truncate { color: var(--color-text); }
#ticketTable td .link:hover { color: var(--color-accent); cursor: pointer; }

/* píldora de estado del ticket */
.ticket-status {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: var(--color-bg);
    color: var(--color-text-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ticket-status.state-open {
    background: rgba(255,91,34,.12);
    border-color: rgba(255,91,34,.35);
    color: #a83c10;
}
.ticket-status.state-closed { background: rgba(17,17,17,.05); }

#pagination { margin: 24px 0 0; }
#pagination li a, #pagination .active, #pagination .previousOff, #pagination .nextOff {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-soft);
}
#pagination li a:hover { background: rgba(17,17,17,.06); color: var(--color-text); }
#pagination .active { background: var(--color-text); color: #fff; }

/* ==========================================================================
   9. FICHA DE TICKET Y CONVERSACION
   ========================================================================== */
#ticketInfo h1 {
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: none;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    line-height: 1.25;
    letter-spacing: -.02em;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--color-line);
}
#ticketInfo h1 small {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--color-text-soft);
    font-size: .8rem;
}
i.refresh { color: var(--color-text-soft); font-size: 70%; }
i.refresh:hover { color: var(--color-accent); }

.infoTable {
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    border-collapse: separate;
    overflow: hidden;
}
.infoTable .headline,
table .headline {
    background: transparent;
    border-bottom: 1px solid var(--color-line);
    padding: 12px 15px;
}
.infoTable th {
    padding: 9px 15px;
    font-weight: 500;
    color: var(--color-text-soft);
    white-space: nowrap;
}
.infoTable td { padding: 9px 15px; font-weight: 500; }
table.custom-data { margin-top: 18px; }
table.custom-data th { background-color: var(--color-bg); padding: 9px 15px; }

#ticketThread { border-bottom: 0; margin-top: 10px; }
#ticketThread::before { display: none; }

/* separación entre las dos fichas de datos del ticket */
#ticketInfo > tbody > tr > td { padding: 0 9px 18px 0; }
#ticketInfo > tbody > tr > td + td { padding: 0 0 18px 9px; }
.thread-entry { margin-bottom: 24px; }
.thread-entry > .avatar { border-radius: 50%; }
.thread-entry .header {
    padding: 12px 16px;
    font-size: 13px;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: var(--radius) var(--radius) 0 0;
}
.thread-entry .header .title { font-weight: 500; }
.thread-entry.message .header { background: var(--color-bg); color: var(--color-text); }
.thread-entry.response .header {
    background: var(--color-bg-dark);
    border-color: var(--color-bg-dark);
    color: #fff;
}
.thread-entry.response .header a,
.thread-entry.response .header .faded,
.thread-entry.response .header .title { color: rgba(255,255,255,.72); }
.thread-entry.avatar.message .header:before { border-right-color: var(--color-line); }
.thread-entry.avatar.message .header:after  { border-right-color: var(--color-bg); }
.thread-entry.avatar.response .header:before { border-left-color: var(--color-bg-dark); }
.thread-entry.avatar.response .header:after  { border-left-color: var(--color-bg-dark); }
.thread-entry .thread-body {
    border: 1px solid var(--color-line);
    border-top: 0;
    border-bottom: 1px solid var(--color-line);
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--color-surface);
    padding: 18px;
    font-family: var(--font-body);
    font-size: 15px !important;
    color: var(--color-text);
}
.thread-body .attachments {
    background: var(--color-bg);
    border-top: 1px solid var(--color-line);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 10px 18px;
    margin: 0 -18px;
    top: 18px;
}
.thread-body .attachments a { color: var(--color-text); }
.thread-body .attachments a:hover { color: var(--color-accent); }
.thread-event { padding-bottom: 18px; }
.thread-event .description { color: var(--color-text-soft); font-size: 13px; }
.type-icon {
    border-radius: 999px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-line);
    color: var(--color-text-soft);
}
.type-icon.dark { background-color: var(--color-text); border-color: var(--color-text); color: #fff; }

.label {
    background-color: var(--color-text);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-shadow: none;
}
.label-bare {
    background: transparent;
    border: 1px solid var(--color-line);
    color: var(--color-text-soft);
}

#reply {
    margin-top: 30px;
    padding: 24px;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
}
#reply h2 {
    border-bottom: 1px solid var(--color-line);
    border-bottom-style: solid;
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-size: 11px;
}
#reply > table { width: 100%; }
#reply input[type=text] { border: 1px solid var(--color-line); }

/* ==========================================================================
   10. ACCESO / REGISTRO / PERFIL
   ========================================================================== */
#clientLogin {
    display: block;
    margin-top: 24px;
    padding: 28px;
    background: var(--color-surface);
    background-image: none;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    box-shadow: none;
}
#clientLogin > div[style*="display:table-row"] {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px 34px;
}
#clientLogin > div[style*="display:table-cell"] {
    display: block !important;
    flex: 1 1 240px;
    padding: 0 !important;
    vertical-align: top;
}
#clientLogin .login-box {
    display: block;
    width: auto;
    flex: 1 1 320px;
    max-width: 420px;
    padding: 0;
    box-shadow: none;
}
.rtl #clientLogin .login-box { box-shadow: none; }
#clientLogin .instructions { display: block; padding: 0; }
.rtl #clientLogin .instructions { padding: 0; }
#clientLogin input[type=text], #clientLogin input[type=password] {
    width: 100%;
    max-width: 420px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
}
#clientLogin input[type=submit] { padding: 13px 24px; border-radius: 999px; }
#clientLogin strong { color: var(--color-danger); font-size: 13px; margin-bottom: 8px; }
#clientLogin p { clear: none; }

.external-auth-box {
    border: 1px solid var(--color-line);
    border-radius: 999px;
    overflow: hidden;
}
.external-auth-icon { border-right: 1px solid var(--color-line); color: var(--color-text-soft); }
.external-auth-name { color: var(--color-text); font-size: 14px; }

table.padded tr > td, table.padded tr > th { padding-bottom: 10px; }

/* ==========================================================================
   11. VARIOS
   ========================================================================== */
#loading {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
#loading h4 { font-family: var(--font-body); font-weight: 600; color: var(--color-text); }
#overlay { background: var(--color-bg-dark); }
.draft-saved { border-radius: 999px; background-color: rgba(17,17,17,.8); }
.non-local-image { border-color: var(--color-line); border-radius: var(--radius); }

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .sidebar { float: none; width: auto; margin: 0 0 26px; }
    .rtl .sidebar { float: none; margin: 0 0 26px; }
    .main-content { overflow: visible; }
    .featured-category { width: 100%; margin-right: 0; }
    #ticketInfo > tbody > tr > td { display: block; width: auto !important; padding: 0 0 16px; }
    #kb-search #query, #kb-search #cid { width: 100%; }
}

@media (max-width: 680px) {
    #header {
        padding: 18px 0 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    #header #logo { order: 1; }
    #header .pull-right { order: 2; text-align: left; width: 100%; }
    #header .ls-usernav, #header .ls-langs { justify-content: flex-start; text-align: left; }
    #header #logo img { max-height: 42px; }
    #nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 14px;
    }
    #nav li a { white-space: nowrap; padding: 10px 14px; }
    #content { padding: 20px 16px; border-radius: var(--radius); margin: 18px 0 36px; }
    #ticketTable { display: block; overflow-x: auto; white-space: nowrap; }
    #ticketSearchForm .pull-right { margin-left: 0; width: 100%; }
    .thread-entry.avatar, .thread-entry.response.avatar { margin-left: 0; margin-right: 0; }
    .thread-entry > .avatar { display: none; }
    .thread-event { margin-left: 0; }
    .thread-event .description { width: auto; margin-left: 0; padding-left: 8px; }
    #ticketThread::before { display: none; }
    .ls-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

@media print {
    body { background: #fff; display: block; }
    #footer { background: none; color: #000; }
    #content { border: 0; padding: 0; }
}

/* contador de tickets en la barra de usuario */
#header .ls-usernav a b { font-family: var(--font-mono); font-weight: 600; }
