/* =========================================================
   Variables globales
   Centraliza colores, radios, sombras y transiciones.
   ========================================================= */
:root {
    --color-bg: #fff6f8;
    --color-bg-soft: #fff2f5;
    --color-surface: rgba(255, 255, 255, 0.82);
    --color-surface-strong: #ffffff;
    --color-border: rgba(15, 23, 42, 0.08);
    --color-border-strong: rgba(15, 23, 42, 0.14);
    --color-text: #2a1f33;
    --color-text-soft: #7a6780;
    --color-primary: #ff5a3d;
    --color-primary-strong: #f04b2e;
    --color-primary-soft: rgba(255, 90, 61, 0.10);
    --color-accent: #c91b86;
    --color-warning: #ffb347;
    --color-warning-strong: #ff8a3d;
    --color-danger: #e85d75;
    --color-success: #1ea97c;
    --color-white: #ffffff;
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.10);
    --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-dark: 0 26px 60px rgba(2, 6, 23, 0.28);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --radius-pill: 999px;
    --transition-fast: 0.18s ease;
}

/* =========================================================
   Base del sitio
   Tipografia, fondo general y reglas compartidas.
   ========================================================= */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
}

body.app-body {
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(255, 90, 61, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(201, 27, 134, 0.12), transparent 22%),
        linear-gradient(180deg, var(--color-bg-soft) 0%, #fff9fb 42%, #fff5f8 100%);
}

a {
    color: inherit;
}

/* =========================================================
   Estructura principal
   Contenedor general, navbar, hero y secciones.
   ========================================================= */
.app-shell {
    width: min(1440px, calc(100% - 28px));
    margin: 20px auto 28px;
}

.app-navbar {
    position: sticky;
    top: 18px;
    z-index: 1040;
    margin-bottom: 24px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(48, 22, 46, 0.96), rgba(94, 28, 63, 0.90));
    /*box-shadow: var(--shadow-dark);*/
    backdrop-filter: blur(18px);
}

.app-brand {
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    padding: 6px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    object-fit: contain;
}

.brand-logo {
    width: auto;
    height: 22px;
    display: block;
    object-fit: contain;
}

.brand-tagline {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(241, 245, 249, 0.78);
}

.nav-pills-app {
    gap: 10px;
}

.app-navbar-head {
    min-width: 0;
}

#app-main-nav {
    width: 100%;
}

.app-menu-toggle {
    min-height: 40px;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-pill);
    color: var(--color-white);
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
}

.nav-link-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    color: rgba(241, 245, 249, 0.8);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    transition: all var(--transition-fast);
}

.nav-link-app:hover,
.nav-link-app:focus {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

.nav-link-app.active {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-color: transparent;
    box-shadow: 0 14px 32px rgba(201, 27, 134, 0.28);
}

.app-submenu {
    min-width: 220px;
    padding: 10px;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-card);
}

.app-submenu .dropdown-item {
    min-height: 40px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    color: var(--color-text);
    font-weight: 700;
}

.app-submenu .dropdown-item:hover,
.app-submenu .dropdown-item:focus {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.app-submenu .dropdown-item.active {
    color: var(--color-white);
    background: var(--color-primary);
}

.app-page {
    padding: 0 4px 8px;
}

.page-hero {
    padding: 24px 26px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 252, 0.76));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.page-title {
    margin: 0;
    font-size: clamp(1.7rem, 2vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin: 10px 0 0;
    color: var(--color-text-soft);
    max-width: 760px;
}

.glass-card,
.card {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 252, 0.84));
    box-shadow: var(--shadow-soft);
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}

.card.border-0 {
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}

.section-card {
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 252, 0.8));
    box-shadow: var(--shadow-soft);
}

.metric-card {
    height: 100%;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 253, 0.82));
    box-shadow: var(--shadow-card);
}

.metric-label {
    display: block;
    color: var(--color-text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-value {
    display: block;
    margin-top: 12px;
    font-size: clamp(1.8rem, 2.6vw, 2.6rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.metric-note {
    display: block;
    margin-top: 8px;
    color: var(--color-text-soft);
    font-size: 0.9rem;
}

/* =========================================================
   Formularios y botones
   Estilos consistentes para interacciones.
   ========================================================= */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 14px 26px rgba(201, 27, 134, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-warning {
    border-width: 1px;
}

.form-control,
.form-select {
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(255, 90, 61, 0.36);
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 61, 0.12);
}

.quill-source {
    display: none !important;
}

.quill-field {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.quill-field:focus-within {
    border-color: rgba(255, 90, 61, 0.36);
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 61, 0.12);
}

.quill-field .ql-toolbar.ql-snow {
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.78);
}

.quill-field .ql-container.ql-snow {
    border: 0;
    font-family: 'Manrope', sans-serif;
}

.quill-field .ql-editor {
    min-height: 180px;
    color: var(--color-text);
    font-size: 0.98rem;
    line-height: 1.65;
}

.quill-field .ql-editor.ql-blank::before {
    color: var(--color-text-soft);
    font-style: normal;
}

.quill-field.is-compact .ql-editor {
    min-height: 120px;
}

/* =========================================================
   Tablas y resúmenes
   Apariencia global para listados y métricas compactas.
   ========================================================= */
.table-shell {
    overflow: hidden;
    border-radius: 22px;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--color-text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(248, 250, 252, 0.92);
}

.table tbody td {
    padding: 18px;
    vertical-align: middle;
    border-color: rgba(148, 163, 184, 0.10);
}

.table tbody tr:hover {
    background: rgba(15, 122, 229, 0.03);
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.summary-pill {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.summary-pill-label {
    color: var(--color-text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-pill-value {
    display: block;
    margin-top: 8px;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
}

.summary-pill-value-warning {
    color: var(--color-warning-strong);
}

/* =========================================================
   Prioridades y componentes de tickets
   Colores compartidos por tarjetas, badges y chips.
   ========================================================= */
.badge-priority-baja {
    color: var(--color-white);
    background: linear-gradient(135deg, #4e8cf6, #2d6cdf);
}

.badge-priority-media {
    color: #513100;
    background: linear-gradient(135deg, #ffd580, #ffbf5f);
}

.badge-priority-alta {
    color: var(--color-white);
    background: linear-gradient(135deg, #ff9966, #ff7a45);
}

.badge-priority-urgente {
    color: var(--color-white);
    background: linear-gradient(135deg, #f46b7b, #db4b64);
}

.priority-baja {
    --ticket-glow: rgba(45, 108, 223, 0.18);
    --ticket-accent: #2d6cdf;
}

.priority-media {
    --ticket-glow: rgba(255, 191, 95, 0.22);
    --ticket-accent: var(--color-warning);
}

.priority-alta {
    --ticket-glow: rgba(255, 122, 69, 0.2);
    --ticket-accent: #ff7a45;
}

.priority-urgente {
    --ticket-glow: rgba(219, 75, 100, 0.22);
    --ticket-accent: #db4b64;
}

.ticket-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 253, 0.9));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.ticket-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--ticket-accent, #2d6cdf);
    box-shadow: 0 0 24px var(--ticket-glow, rgba(45, 108, 223, 0.18));
}

.ticket-card .card-body {
    position: relative;
    padding: 18px 18px 16px 20px;
}

.ticket-card-title {
    font-size: 1rem;
    line-height: 1.3;
}

.ticket-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #4c617a;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ticket-mini-chip-company {
    color: var(--color-primary);
    background: rgba(15, 122, 229, 0.08);
}

.ticket-mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    color: #0f766e;
    cursor: help;
    flex-shrink: 0;
}

.ticket-mini-icon i {
    font-size: 1.05rem;
    line-height: 1;
}

.ticket-mini-icon-seen {
    color: #0f766e;
}

.ticket-card .ticket-mini-icon-seen {
    width: 18px;
    height: 18px;
    padding: 0;
    background: transparent;
    border: 0;
}

.ticket-card .ticket-mini-icon-seen i {
    font-size: 0.78rem;
}

.ticket-publication-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    vertical-align: middle;
    cursor: help;
    flex-shrink: 0;
}

.ticket-publication-indicator.is-pending {
    color: #c2410c;
}

.ticket-publication-indicator.is-published {
    color: #15803d;
}

/*.ticket-publication-indicator svg {
    width: 22px;
    height: 22px;
    display: block;
}*/

.ticket-publication-indicator path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-publication-indicator.is-pending path{
    stroke-width: 1.2;
}

.ticket-publication-indicator-detail {
    width: 35px;
    height: 35px;
}

.ticket-publication-status.is-pending {
    color: #9a3412;
}

.ticket-publication-status.is-published {
    color: #166534;
}

.ticket-priority-badge {
    border-radius: var(--radius-pill);
    padding: 0.55rem 0.8rem;
}

.ticket-card-description {
    color: #526377;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta {
    color: #718399;
    font-size: 0.76rem;
    text-align: right;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ticket-meta-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ticket-meta-time.is-active {
    color: #1f8f5f;
}

.ticket-meta-clock {
    width: 12px;
    height: 12px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    position: relative;
    display: inline-block;
}

.ticket-meta-clock::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 1px;
    height: 4px;
    background: currentColor;
}

.ticket-meta-clock::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 3px;
    height: 1px;
    background: currentColor;
}

.ticket-detail-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ticket-detail-head-main {
    min-width: 0;
}

.ticket-detail-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.ticket-detail-title-row h3 {
    margin: 0;
}

.ticket-detail-seen-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f766e;
    cursor: help;
}

.ticket-detail-seen-inline i {
    font-size: 1rem;
    line-height: 1;
}

.ticket-detail-head-aside {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.ticket-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ticket-detail-actions form {
    margin: 0;
}

.ticket-detail-actions-inline {
    flex-wrap: nowrap;
    align-items: center;
}

.ticket-detail-state-form {
    flex-wrap: nowrap;
    margin: 0;
}

.ticket-detail-state-select {
    width: auto;
    min-width: 118px;
    min-height: 31px !important;
    height: 31px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.75rem;
    padding-right: 2rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    background-size: 10px 12px;
    background-position: right 0.7rem center;
}

.ticket-detail-admin-legacy {
    display: none;
}

.ticket-timer-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.ticket-timer-fab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f7ae5, #1b4fd8);
    box-shadow: 0 18px 36px rgba(15, 122, 229, 0.26);
    font-weight: 800;
}

.ticket-timer-floating.is-active .ticket-timer-fab {
    background: linear-gradient(135deg, #0d9467, #0f766e);
    box-shadow: 0 18px 36px rgba(13, 148, 103, 0.24);
}

.ticket-timer-fab-icon {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 999px;
    position: relative;
    display: inline-block;
}

.ticket-timer-fab-icon::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 2px;
    width: 2px;
    height: 6px;
    background: currentColor;
}

.ticket-timer-fab-icon::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    width: 5px;
    height: 2px;
    background: currentColor;
}

.ticket-timer-fab-time {
    font-size: 0.98rem;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.ticket-timer-panel {
    width: min(360px, calc(100vw - 32px));
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.ticket-timer-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ticket-timer-panel-title {
    color: var(--color-text);
    font-weight: 800;
}

.ticket-timer-panel-subtitle,
.ticket-timer-panel-meta,
.ticket-timer-panel-note {
    color: #718399;
    font-size: 0.82rem;
}

.ticket-timer-panel-close {
    border: 0;
    background: transparent;
    color: #8a9aab;
    font-size: 1.4rem;
    line-height: 1;
}

.ticket-timer-panel-body {
    margin-top: 14px;
}

.ticket-timer-panel-time,
.ticket-time-modal-value {
    color: var(--color-text);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.ticket-timer-panel-note {
    margin-top: 8px;
}

.ticket-timer-panel-note.is-active {
    color: #0f8a63;
    font-weight: 700;
}

.ticket-timer-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.ticket-timer-panel-actions form {
    margin: 0;
}

.ticket-time-modal-summary {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

/* =========================================================
   Notificaciones
   Menu desplegable y estados vacios.
   ========================================================= */
.notification-menu {
    width: 340px;
    max-width: calc(100vw - 2rem);
    overflow: hidden;
    border: 0;
    border-radius: 18px;
}

.notification-head {
    padding: 10px 14px;
    font-size: 0.86rem;
}

.notification-badge-live {
    animation: notificationBadgePulse 2s ease-in-out infinite;
}

.notification-item {
    position: relative;
    display: flex;
    gap: 9px;
    padding: 9px 12px 9px 14px;
    border-color: rgba(148, 163, 184, 0.12);
    white-space: normal;
    font-size: 0.78rem;
    line-height: 1.3;
}

.notification-item::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: transparent;
}

.notification-item.is-unread {
    background: rgba(15, 122, 229, 0.06);
}

.notification-item.is-unread::before {
    background: var(--color-primary);
}

.notification-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.32);
}

.notification-item.is-unread .notification-dot {
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(15, 122, 229, 0.12);
    animation: notificationDotPulse 2.6s ease-in-out infinite;
}

.notification-content {
    min-width: 0;
}

.notification-title {
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.notification-item.is-unread .notification-title {
    color: #0b5fc1;
    font-weight: 900;
}

.notification-message {
    margin-top: 2px;
    color: var(--color-text-soft);
    font-size: 0.74rem;
}

.notification-date {
    margin-top: 4px;
    color: #8a9aab;
    font-size: 0.68rem;
    font-weight: 700;
}

.notification-empty {
    padding: 12px 14px;
    color: var(--color-text-soft);
    font-size: 0.78rem;
}

.notification-actions {
    padding: 7px 12px;
    background: rgba(248, 250, 252, 0.88);
}

.notification-actions .btn {
    font-size: 0.74rem;
}

.notification-scroll {
    max-height: 320px;
    overflow-y: auto;
}

@keyframes notificationBadgePulse {
    0%, 100% {
        transform: translate(-50%, 0) scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.18);
    }

    50% {
        transform: translate(-50%, 0) scale(1.08);
        box-shadow: 0 0 0 7px rgba(220, 53, 69, 0.12);
    }
}

@keyframes notificationDotPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(15, 122, 229, 0.12);
    }

    50% {
        transform: scale(1.18);
        box-shadow: 0 0 0 7px rgba(15, 122, 229, 0.08);
    }
}

.app-footer-space {
    height: 8px;
}

.suggestion-floating-button {
    position: fixed;
    right: 18px;
    bottom: 96px;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 20px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 18px;
    color: var(--color-white);
    font-weight: 800;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.98), rgba(15, 122, 229, 0.98)),
        var(--color-primary);
    box-shadow: 0 18px 36px rgba(15, 122, 229, 0.34), 0 6px 14px rgba(16, 185, 129, 0.18);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.suggestion-floating-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 10px;
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    background: rgba(255, 255, 255, 0.95);
}

.suggestion-floating-button:hover,
.suggestion-floating-button:focus {
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(15, 122, 229, 0.42), 0 8px 16px rgba(16, 185, 129, 0.22);
}

/* =========================================================
   Login
   Estilos exclusivos de la pantalla de acceso.
   ========================================================= */
body.login-page {
    margin: 0;
    color: #281f33;
    background:
        radial-gradient(circle at top left, rgba(255, 90, 61, 0.36), transparent 28%),
        radial-gradient(circle at bottom right, rgba(201, 27, 134, 0.28), transparent 26%),
        linear-gradient(135deg, #2e1830 0%, #522042 52%, #7a2754 100%);
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-grid {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 460px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.38);
    backdrop-filter: blur(20px);
}

.login-showcase {
    position: relative;
    padding: 44px;
    color: #f8fbff;
    background:
        radial-gradient(circle at top left, rgba(255, 173, 96, 0.18), transparent 26%),
        radial-gradient(circle at bottom right, rgba(201, 27, 134, 0.22), transparent 30%),
        linear-gradient(155deg, rgba(56, 20, 45, 0.94) 0%, rgba(117, 38, 83, 0.92) 56%, rgba(255, 90, 61, 0.84) 100%);
}

.login-showcase::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    pointer-events: none;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
}

.login-showcase h1 {
    margin: 24px 0 14px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.login-showcase p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 244, 248, 0.86);
    font-size: 1rem;
}

.login-points {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.login-point {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-point strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.login-form-panel {
    padding: 38px 34px;
    background: rgba(255, 255, 255, 0.92);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.login-brand img {
    width: auto;
    height: 38px;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.login-brand-title {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.login-brand-subtitle {
    display: block;
    color: var(--color-text-soft);
    font-size: 0.88rem;
}

.login-heading {
    margin-bottom: 24px;
}

.login-heading h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-heading p {
    margin: 10px 0 0;
    color: var(--color-text-soft);
}

.login-alert {
    margin-bottom: 18px;
    border: 0;
    border-radius: 16px;
}

.login-recovery-link {
    margin-top: 16px;
    text-align: center;
}

.login-recovery-link a {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
}

.login-recovery-link a:hover {
    color: var(--color-primary);
}

.btn-login {
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    font-weight: 800;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 18px 34px rgba(201, 27, 134, 0.24);
}

.btn-login:hover,
.btn-login:focus {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}

.login-footnote {
    margin-top: 18px;
    color: var(--color-text-soft);
    font-size: 0.9rem;
    text-align: center;
}

/* =========================================================
   Dashboard
   Columnas kanban, contadores y estados vacios.
   ========================================================= */
.dashboard-column-shell {
    height: 100%;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 253, 0.84));
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.dashboard-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-column-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-column-note {
    color: #718399;
    font-size: 0.84rem;
}

.dashboard-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 800;
    background: var(--color-primary-soft);
}

.dashboard-column {
    min-height: 460px;
    /*padding: 14px;*/
    border: 2px dashed transparent;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.85) 0%, rgba(255, 255, 255, 0.92) 100%);
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.dashboard-column.dashboard-dropzone {
    border-color: #bfd4ff;
    background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.05);
}

.dashboard-column.dashboard-dropzone::after {
    content: 'Suelta el ticket aqui';
    display: block;
    margin-top: 10px;
    padding: 12px;
    border: 1px dashed #c7d7f7;
    border-radius: 14px;
    color: #6c7ea5;
    font-size: 0.85rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.74);
}

.dashboard-column.dashboard-dropzone > .ticket-card + .ticket-card {
    margin-top: 12px;
}

.dashboard-column.dashboard-dropzone-active {
    border-color: #7fb0ff;
    background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%);
}

.dashboard-column.dashboard-dropzone-hover {
    border-color: #0d6efd;
    background: linear-gradient(180deg, #e3efff 0%, #f8fbff 100%);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.10);
    transform: translateY(-2px);
}

.dashboard-column .ticket-card {
    cursor: grab;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.dashboard-column .ticket-card + .ticket-card {
    margin-top: 12px;
}

.dashboard-column .ticket-card:active {
    cursor: grabbing;
}

.dashboard-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 18px;
    text-align: center;
    color: #718399;
    background: rgba(248, 250, 252, 0.85);
}

.sortable-chosen {
    transform: rotate(1deg) scale(1.01);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.18);
}

.sortable-ghost {
    opacity: 0.35;
    background: #dbe8ff;
    border: 2px dashed #78a9ff !important;
}

.sortable-drag {
    opacity: 1 !important;
    transform: rotate(2deg) scale(1.03);
    box-shadow: 0 22px 40px rgba(17, 24, 39, 0.24);
    z-index: 1050;
}

/* =========================================================
   Vista de tickets
   Toolbar, resumen, chips y tabla principal.
   ========================================================= */
.tickets-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tickets-grid-info {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 18px;
}

.tickets-chart {
    padding: 18px;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.tickets-chart .progress {
    height: 18px;
    border-radius: var(--radius-pill);
    background: rgba(226, 232, 240, 0.72);
}

.tickets-chart .progress-bar {
    font-size: 0.72rem;
    font-weight: 800;
}

.tickets-filter-card {
    padding: 22px;
}

.ticket-row-title {
    display: block;
    margin-bottom: 4px;
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.ticket-col-main {
    min-width: 240px;
}

.ticket-col-description {
    min-width: 280px;
}

.ticket-row-subtitle {
    color: #718399;
    font-size: 0.84rem;
}

.ticket-table-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    color: #4d6079;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgba(241, 245, 249, 0.92);
}

.ticket-state-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.ticket-state-pill.state-pendiente {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.10);
}

.ticket-state-pill.state-proceso {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}

.ticket-state-pill.state-finalizado {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.ticket-description-snippet {
    color: #5f7287;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ticket-col-project {
    min-width: 180px;
}

.ticket-empty-state {
    padding: 42px 20px;
    text-align: center;
    color: #718399;
}

.pagination-shell {
    display: flex;
    justify-content: flex-start;
    padding: 18px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.94) 100%);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination li {
    list-style: none;
}

.pagination a,
.pagination .page-item .page-link {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: #35506f;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.pagination a:hover,
.pagination .page-item .page-link:hover {
    border-color: rgba(37, 99, 235, 0.34);
    color: #1d4ed8;
    background: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.pagination li.active a,
.pagination .page-item.active .page-link {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 14px 28px rgba(201, 27, 134, 0.24);
}

.pagination li.disabled a,
.pagination .page-item.disabled .page-link {
    color: #9aa8b8;
    background: rgba(241, 245, 249, 0.88);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: none;
}

.ticket-conversation-card {
    padding: 18px 20px;
}

.ticket-comment-form textarea {
    min-height: 84px;
}

.ticket-attachment-inline-form,
.ticket-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.ticket-upload-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(15, 122, 229, 0.18);
    border-radius: 999px;
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    background: rgba(219, 234, 254, 0.65);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.ticket-upload-button:hover {
    border-color: rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.9);
}

.ticket-upload-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 16px 18px;
    border: 1px dashed rgba(255, 90, 61, 0.32);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 245, 0.92));
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.ticket-upload-dropzone:hover {
    border-color: rgba(255, 90, 61, 0.5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 242, 245, 1));
    box-shadow: 0 12px 24px rgba(255, 90, 61, 0.08);
}

.ticket-upload-dropzone.is-dragover {
    border-color: rgba(255, 90, 61, 0.72);
    background: linear-gradient(180deg, rgba(255, 248, 250, 1), rgba(255, 236, 241, 1));
    box-shadow: 0 14px 28px rgba(255, 90, 61, 0.14);
    transform: translateY(-1px);
}

.ticket-upload-dropzone.has-files {
    border-style: solid;
    border-color: rgba(30, 169, 124, 0.36);
}

.ticket-upload-dropzone-title {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 800;
}

.ticket-upload-dropzone-text {
    color: var(--color-text-soft);
    font-size: 0.83rem;
    line-height: 1.45;
}

.ticket-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.ticket-upload-selected {
    color: #6b7d92;
    font-size: 0.8rem;
    line-height: 1.4;
}

.app-inline-toast-host {
    position: relative;
}

.app-inline-toast-container {
    position: absolute;
    z-index: 1085;
    transform: translate(-50%, -100%);
    pointer-events: none;
}

.app-inline-toast-container .toast {
    pointer-events: auto;
    min-width: 260px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.ticket-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    margin-top: 10px;
}

.ticket-upload-preview:empty {
    display: none;
}

.ticket-upload-preview-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 68px;
    flex: 0 0 68px;
    border: 1px solid rgba(255, 90, 61, 0.16);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    padding: 6px;
}

.ticket-upload-preview-title {
    color: #6b7d92;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-upload-preview-item img {
    width: 100%;
    height: 54px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.ticket-upload-preview-icon {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fafc, #eef3f9);
    color: #4b5f78;
    font-size: 1.4rem;
}

.ticket-file-doc-preview {
    width: 30px;
    height: 38px;
    padding-bottom: 4px;
    border-radius: 6px;
}

.ticket-file-doc-preview .ticket-file-doc-fold {
    width: 10px;
    height: 10px;
    border-top-right-radius: 6px;
}

.ticket-file-doc-preview .ticket-file-doc-label {
    min-width: 20px;
    font-size: 0.42rem;
    padding: 1px 3px;
}

.ticket-comment-item {
    scroll-margin-top: 88px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.ticket-comment-item:first-of-type {
    padding-top: 2px;
}

.ticket-comment-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ticket-comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 6px;
}

.ticket-comment-author {
    color: #1d3557;
    font-size: 0.92rem;
    font-weight: 800;
}

.ticket-comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #7e8ea3;
    font-size: 0.75rem;
}

.ticket-comment-body {
    color: #4f6278;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ticket-comment-body-muted {
    color: #7e8ea3;
    font-style: italic;
}

.ticket-comment-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ticket-comment-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #35506f;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(226, 232, 240, 0.72);
}

.ticket-comment-file:hover {
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.92);
}

.ticket-comment-file-icon {
    color: #7a8ca5;
}

.ticket-attachment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ticket-attachment-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 168px;
    padding: 10px;
    border: 1px solid rgba(255, 90, 61, 0.16);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ticket-attachment-card-hitarea {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border: 0;
    border-radius: 18px;
    background: transparent;
    cursor: pointer;
}

.ticket-attachment-card-delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    margin: 0;
}

.ticket-attachment-card-delete {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 1rem;
    line-height: 1;
}

.ticket-attachment-card-delete:hover {
    background: rgba(220, 38, 38, 0.88);
}

.ticket-attachment-card-head {
    position: relative;
    z-index: 2;
    min-width: 0;
    pointer-events: none;
}

.ticket-attachment-card-name,
.ticket-comment-file-title {
    color: #6b7d92;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-attachment-card-preview,
.ticket-comment-file-icon-card {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc, #eef3f9);
    color: #4b5f78;
    font-size: 1.7rem;
    text-decoration: none;
}

.ticket-attachment-card-preview {
    position: relative;
    z-index: 2;
    border: 0;
    pointer-events: none;
}

.ticket-attachment-card-preview:hover {
    background: linear-gradient(180deg, #f4f7fb, #e8eef7);
}

.ticket-attachment-card-preview img,
.ticket-comment-file-icon-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

.ticket-attachment-card-meta {
    position: relative;
    z-index: 2;
    color: #90a0b3;
    font-size: 0.68rem;
    line-height: 1.25;
    pointer-events: none;
}

.ticket-comment-file-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 92px;
    min-height: auto;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(255, 90, 61, 0.16);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ticket-comment-file-card:hover {
    color: #1d4ed8;
    background: #fff;
    border-color: rgba(255, 90, 61, 0.28);
}

.ticket-comment-file-icon-card {
    height: 58px;
    font-size: 1.35rem;
}

.ticket-file-doc {
    position: relative;
    width: 34px;
    height: 42px;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5px;
    border-radius: 7px;
    background: linear-gradient(180deg, #ffffff, #eef3f8);
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.ticket-file-doc-large {
    width: 42px;
    height: 52px;
    padding-bottom: 6px;
    border-radius: 8px;
}

.ticket-file-doc-fold {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    background: rgba(226, 232, 240, 0.95);
    border-top-right-radius: 7px;
}

.ticket-file-doc-large .ticket-file-doc-fold {
    width: 14px;
    height: 14px;
    border-top-right-radius: 8px;
}

.ticket-file-doc-label {
    min-width: 22px;
    padding: 1px 4px;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.44rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.ticket-file-doc-large .ticket-file-doc-label {
    min-width: 26px;
    font-size: 0.5rem;
}

.ticket-file-doc-pdf .ticket-file-doc-label {
    background: #c0392b;
}

.ticket-file-doc-word .ticket-file-doc-label {
    background: #185abd;
}

.ticket-file-doc-excel .ticket-file-doc-label {
    background: #1f7a43;
}

.ticket-file-doc-archive .ticket-file-doc-label {
    background: #7c3aed;
}

.ticket-file-doc-generic .ticket-file-doc-label {
    background: #475569;
}

.ticket-comment-file-card[data-image-lightbox] {
    cursor: zoom-in;
}

.ticket-image-lightbox-dialog {
    max-width: min(1100px, calc(100vw - 24px));
}

.ticket-image-lightbox-content {
    color: #ffffff;
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(10px);
}

.ticket-image-lightbox-media {
    width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 18px;
}

.ticket-comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

@media (hover: hover) {
    .ticket-comment-secondary-actions {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .ticket-comment-item:hover > .ticket-comment-actions .ticket-comment-secondary-actions,
    .ticket-comment-item:focus-within > .ticket-comment-actions .ticket-comment-secondary-actions,
    .ticket-comment-reply:hover > .ticket-comment-actions .ticket-comment-secondary-actions,
    .ticket-comment-reply:focus-within > .ticket-comment-actions .ticket-comment-secondary-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.ticket-comment-secondary-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ticket-comment-secondary-actions form {
    margin: 0;
}

.ticket-comment-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    background: transparent;
}

.ticket-comment-link:hover {
    color: var(--color-primary);
}

.ticket-comment-link-strong {
    color: var(--color-primary);
}

.ticket-comment-edit-form {
    margin-top: 10px;
}

.ticket-inline-reply-form {
    margin-top: 10px;
    margin-left: 18px;
    padding: 10px 12px 12px;
    border-left: 2px solid rgba(59, 130, 246, 0.28);
    border-radius: 0 12px 12px 0;
    background: rgba(239, 246, 255, 0.72);
}

.ticket-inline-reply-label,
.ticket-comment-form-title {
    margin-bottom: 8px;
    color: #35506f;
    font-size: 0.82rem;
    font-weight: 700;
}

.ticket-comment-reply {
    scroll-margin-top: 88px;
    margin-top: 10px;
    margin-left: 18px;
    padding: 10px 12px;
    border-left: 2px solid rgba(59, 130, 246, 0.28);
    border-radius: 0 12px 12px 0;
    background: rgba(239, 246, 255, 0.52);
}

#conversacion-ticket {
    scroll-margin-top: 88px;
}

.ticket-comment-form-bottom {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* =========================================================
   Responsivo
   Ajustes para tablet y movil.
   ========================================================= */
@media (max-width: 991.98px) {
    .ticket-detail-head-aside {
        width: 100%;
        align-items: flex-start;
    }

    .ticket-detail-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ticket-timer-floating {
        right: 12px;
        left: 12px;
        bottom: 12px;
        align-items: stretch;
    }

    .ticket-timer-fab {
        justify-content: center;
        width: 100%;
    }

    .ticket-timer-panel {
        width: 100%;
    }

    .app-shell {
        width: min(100% - 18px, 1440px);
        margin-top: 14px;
    }

    .app-navbar {
        top: 10px;
        padding: 16px;
    }

    .page-hero {
        padding: 22px 18px;
    }

    .nav-pills-app {
        width: 100%;
    }

    .login-grid,
    .tickets-grid-info {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        padding: 32px 28px;
    }

    .login-form-panel {
        padding: 30px 24px;
    }
}

@media (min-width: 1200px) {
    #app-main-nav {
        width: auto;
    }
}

@media (max-width: 1199.98px) {
    .app-navbar-head,
    #app-main-nav {
        width: 100%;
    }

    .nav-pills-app {
        flex-direction: column;
        align-items: stretch !important;
        padding-top: 12px;
    }

    .nav-pills-app .dropdown,
    .nav-link-app {
        width: 100%;
    }

    .nav-link-app {
        justify-content: space-between;
    }

    .app-navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 767.98px) {
    .app-page {
        padding: 0;
    }

    .page-title {
        font-size: 1.65rem;
    }

    .metric-card,
    .section-card {
        padding: 18px;
    }

    .table thead th,
    .table tbody td {
        padding: 14px;
    }

    .ticket-attachment-inline-form,
    .ticket-upload-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .suggestion-floating-button {
        right: 12px;
        bottom: 78px;
        justify-content: center;
        width: 48px;
        min-height: 48px;
        padding: 0;
        border-radius: 18px;
    }

    .suggestion-floating-icon {
        width: 26px;
        height: 26px;
    }

    .suggestion-floating-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

}
