﻿/* ================================================================
   TICKETS.CSS — CSS exclusivo para la seccion Tickets/Actas/OT.
   Separado de app.css para evitar conflictos con estilos de SIM.
   Cargado en index.html y App.razor despues de darkmode.css.
   ================================================================ */

/* ================================================================
   TEMA CLARO/OSCURO — Tickets sincroniza con SIM vía html.dark
   (mismo store Alpine / prefers-color-scheme). TODO el dark va
   scoped a `html.dark .tickets-wrapper`: no se filtra a SIM y gana
   especificidad sobre darkmode.css de SIM. El rojo de marca
   (#ea342c) se mantiene igual en ambos modos.
   Paleta oscura alineada a SIM: bg #0e1726, surface #1f2937,
   surface-muted #111827, text #e5e7eb, muted #9ca3af, border #374151.
   ================================================================ */

.tickets-wrapper {
    background: #f5f5f5;
    min-height: 100%;
    color: #111827;
}
html.dark .tickets-wrapper {
    background: #0e1726;
    color: #e5e7eb;
}

/* Inputs / Forms — la cadena :not() supera la especificidad del genérico
   de darkmode.css (html.dark input:not([type=checkbox])... = 0,5,2). */
html.dark .tickets-wrapper .form-control,
html.dark .tickets-wrapper .form-select,
html.dark .tickets-wrapper textarea,
html.dark .tickets-wrapper select,
html.dark .tickets-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}
html.dark .tickets-wrapper input::placeholder,
html.dark .tickets-wrapper textarea::placeholder {
    color: #9ca3af !important;
}

/* Bootstrap Cards */
html.dark .tickets-wrapper .card { background-color: #1f2937 !important; border-color: #374151 !important; color: #e5e7eb !important; }
html.dark .tickets-wrapper .card-body { background-color: #1f2937 !important; color: #e5e7eb !important; }
html.dark .tickets-wrapper .card-header { background-color: #111827 !important; border-color: #374151 !important; color: #e5e7eb !important; }
html.dark .tickets-wrapper .card-header.bg-primary { background-color: #2563eb !important; color: #ffffff !important; }

/* Tables */
html.dark .tickets-wrapper .table {
    color: #e5e7eb !important;
    --bs-table-bg: #1f2937 !important;
    --bs-table-striped-bg: #243042 !important;
    --bs-table-hover-bg: #374151 !important;
}
html.dark .tickets-wrapper .table th,
html.dark .tickets-wrapper .table td { border-color: #374151 !important; color: #e5e7eb !important; }
html.dark .tickets-wrapper .table thead th { background-color: #111827 !important; color: #9ca3af !important; }

/* List groups */
html.dark .tickets-wrapper .list-group-item { background-color: #1f2937 !important; color: #e5e7eb !important; border-color: #374151 !important; }

/* Bootstrap Modals */
html.dark .tickets-wrapper .modal-content { background-color: #1f2937 !important; color: #e5e7eb !important; }
html.dark .tickets-wrapper .modal-header { border-color: #374151 !important; }
html.dark .tickets-wrapper .modal-body { background-color: #1f2937 !important; color: #e5e7eb !important; }

/* Buttons */
html.dark .tickets-wrapper .btn-outline-secondary { color: #9ca3af !important; border-color: #4b5563 !important; background-color: transparent !important; }

/* Text */
html.dark .tickets-wrapper .text-muted { color: #9ca3af !important; }
html.dark .tickets-wrapper .fw-semibold,
html.dark .tickets-wrapper .fw-bold { color: inherit; }

/* Borders */
html.dark .tickets-wrapper .border { border-color: #374151 !important; }

/* ===== TICKETS/ACTAS/OT STYLES ===== */
/* Card Grid Component - Responsive Design */
.card-grid-screen {
    padding: 24px 20px 100px;
    min-height: 100%;
    background: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.card-grid-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 18px;
}

.card-grid-container {
    display: grid;
    gap: 12px;
    /* Mobile-first: 2 columnas por defecto */
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Tablets y pantallas medianas: 3 columnas */
@media (min-width: 640px) {
    .card-grid-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Desktop: 4 columnas */
@media (min-width: 1024px) {
    .card-grid-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Desktop grande: 5 columnas */
@media (min-width: 1280px) {
    .card-grid-container {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.card-grid-item {
    background: white;
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.card-grid-item i {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
    color: #ea342c;
}

.card-grid-item:hover {
    border-color: #ea342c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(234, 52, 44, 0.15);
}

.card-grid-item:active {
    transform: translateY(0);
}

.actas-screen {
    padding: 24px 20px 120px;
    min-height: 100%;
    background: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.actas-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.actas-header p {
    color: #6b7280;
    margin-bottom: 18px;
}

.actas-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.actas-tab-btn {
    flex: 1;
    border: 2px solid transparent;
    background: white;
    color: #111827;
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.actas-tab-btn.active {
    border-color: #ea342c;
    color: #ea342c;
    box-shadow: 0 8px 18px rgba(234, 52, 44, 0.18);
}

.actas-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
    margin-bottom: 18px;
}

.actas-search i {
    color: #9ca3af;
}

.actas-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.actas-state {
    text-align: center;
    padding: 24px 12px;
    color: #6b7280;
}

/* Grid de módulos en Explorar Actas */
.actas-screen .global-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 0;
}

.actas-screen .global-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: center;
    width: 100%;
}

.actas-screen .global-card:active {
    border-color: #ea342c;
    box-shadow: 0 2px 8px rgba(234, 52, 44, 0.18);
}

.actas-screen .global-card-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.actas-screen .global-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
}

html.dark .actas-screen .global-card {
    background: #1f2937;
    border-color: #374151;
}
html.dark .actas-screen .global-card-name { color: #e5e7eb; }
html.dark .actas-screen .global-card:active {
    border-color: #f87171;
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.2);
}

.actas-cards {
    display: grid;
    gap: 14px;
}

.acta-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acta-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.acta-module {
    font-weight: 700;
    color: #111827;
}

.acta-author {
    font-size: 12px;
    color: #6b7280;
}

.acta-description {
    color: #374151;
    font-size: 14px;
}

.acta-propuesta {
    font-size: 13px;
    color: #4b5563;
    background: #f3f4f6;
    padding: 8px 10px;
    border-radius: 10px;
}

.acta-responsable {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acta-responsable i {
    color: #ea342c;
}

.acta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    color: #6b7280;
}

.acta-date-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.acta-meta i {
    margin-right: 4px;
    color: #ea342c;
}

.acta-badge {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.acta-badge-estado {
    background: rgba(234, 52, 44, 0.12);
    color: #ea342c;
}

.acta-badge-estado-proceso {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.acta-badge-estado-completado {
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
}

.acta-badge-prioridad {
    background: rgba(17, 24, 39, 0.08);
    color: #111827;
}

.acta-badge-vencimiento {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.prioridad-baja {
    background: rgba(56, 189, 248, 0.2);
    color: #0e7490;
}

.prioridad-media {
    background: rgba(250, 204, 21, 0.25);
    color: #a16207;
}

.prioridad-alta {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.vencimiento-vencido {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.acta-footer {
    display: flex;
    justify-content: flex-end;
}

.publicaciones-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.publicaciones-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.publicaciones-header p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.publicaciones-list {
    display: grid;
    gap: 16px;
}

.publicacion-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.publicacion-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.publicacion-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ea342c;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publicacion-meta {
    flex: 1;
}

.publicacion-author {
    font-weight: 700;
    color: #111827;
}

.publicacion-date {
    font-size: 12px;
    color: #6b7280;
}

.publicacion-context {
    font-size: 11px;
    color: #ea342c;
    font-weight: 700;
}

.publicacion-body {
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.publicacion-archivo {
    border: none;
    background: rgba(234, 52, 44, 0.1);
    color: #ea342c;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tickets-screen {
    padding: 24px 20px 120px;
    min-height: 100%;
    background: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tickets-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.tickets-header p {
    color: #6b7280;
    margin-bottom: 18px;
}

.tickets-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tickets-tab-btn {
    flex: 1;
    border: 2px solid transparent;
    background: white;
    color: #111827;
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.tickets-tab-btn.active {
    border-color: #ea342c;
    color: #ea342c;
    box-shadow: 0 8px 18px rgba(234, 52, 44, 0.18);
}

.tickets-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
    margin-bottom: 18px;
}
.tickets-search-row {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.tickets-search-row .tickets-search {
    margin-bottom: 0;
}

.ticket-status-select {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
    padding: 10px 12px;
    min-height: 44px;
}

.tickets-search-row {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .tickets-search-row {
        grid-template-columns: 1fr 200px;
        align-items: center;
    }

    .ticket-status-select {
        align-self: stretch;
        height: 100%;
    }
}

.tickets-search i {
    color: #9ca3af;
}

.tickets-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.tickets-state {
    text-align: center;
    padding: 24px 12px;
    color: #6b7280;
}

.tickets-cards {
    display: grid;
    gap: 14px;
}

.ticket-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.ticket-title {
    font-weight: 700;
    color: #111827;
}

.ticket-meta-line {
    font-size: 12px;
    color: #6b7280;
}

.ticket-info {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

.ticket-info-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.ticket-info-line i {
    margin-top: 2px;
    color: #ea342c;
}

.ticket-body {
    color: #374151;
    font-size: 14px;
}

.ticket-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
    align-items: center;
}

.ticket-footer i {
    margin-right: 4px;
    color: #ea342c;
}

.ticket-footer .btn {
    font-size: 12px;
    padding: 4px 10px;
}

.ticket-badge {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-resuelto { background: rgba(16, 185, 129, 0.18); color: #047857; }
.status-progreso { background: rgba(59, 130, 246, 0.18); color: #1d4ed8; }
.status-pendiente { background: rgba(234, 88, 12, 0.18); color: #c2410c; }
.status-rechazado { background: rgba(239, 68, 68, 0.18); color: #b91c1c; }
.status-desestimado { background: rgba(107, 114, 128, 0.18); color: #4b5563; }
.tickets-main-tabs {
    margin-bottom: 14px;
}

.tickets-main-tabs .nav-link {
    font-weight: 700;
    color: #6b7280;
}

.tickets-main-tabs .nav-link.active {
    color: #ea342c;
}

.tickets-status-group {
    margin-bottom: 16px;
}

.tickets-status-group .btn {
    font-size: 12px;
    font-weight: 700;
}

.ticket-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
    overscroll-behavior: contain;
}

.ticket-modal {
    background: #ffffff;
    width: min(960px, 100%);
    max-width: calc(100vw - 24px);
    max-height: 90vh;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ticket-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.ticket-modal-header p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #6b7280;
}

@media (max-width: 640px) {
    .ticket-modal {
        max-height: 95vh;
    }

    .ticket-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ticket-modal-header p {
        word-break: break-word;
    }

    .ticket-modal-header .btn {
        align-self: flex-end;
    }
}

.ticket-modal-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.ticket-publication-form {
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.ticket-publication-input {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-publication-input .form-control {
    flex: 1 1 180px;
    min-width: 0;
}

.ticket-publication-input .btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.ticket-attachments-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.ticket-publications-list {
    display: grid;
    gap: 14px;
}

.ticket-publication-card {
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.ticket-publication-card.mine {
    border-color: rgba(234, 52, 44, 0.35);
    background: rgba(234, 52, 44, 0.04);
}

.ticket-publication-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 8px;
    color: #6b7280;
}

.ticket-publication-author {
    font-weight: 700;
    color: #111827;
}

.ticket-publication-body {
    font-size: 14px;
    color: #374151;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.ticket-file {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #f9fafb;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.ticket-file + .ticket-file {
    margin-top: 10px;
}

.ticket-file-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.ticket-file-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ticket-file-info i {
    font-size: 18px;
    color: #ea342c;
}

.ticket-file-name {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
}

.ticket-file-type {
    font-size: 11px;
    color: #6b7280;
}

.ticket-file-actions {
    display: flex;
    gap: 6px;
}

.ticket-file-actions .btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ticket-file-actions i {
    font-size: 14px;
}

.ticket-file-preview iframe,
.ticket-file-preview video,
.ticket-file-preview img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    display: block;
}

.ticket-file-preview iframe {
    height: 320px;
}

.ticket-file-fallback {
    font-size: 13px;
    color: #6b7280;
    padding: 10px 0;
}

.ticket-file-loading {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.tk-spinner-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #ea342c; opacity: 0.7;
    animation: tk-dot-pulse 1.2s ease-in-out infinite;
}
.tk-spinner-dot:nth-child(2) { animation-delay: 0.2s; }
.tk-spinner-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tk-dot-pulse {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 1; }
}

body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.ticket-publication-card.mine {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.08);
}

.ticket-publication-card.system {
    border-color: rgba(234, 52, 44, 0.45);
    background: rgba(234, 52, 44, 0.08);
}


.ticket-file-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.ticket-file-fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #f9fafb;
    margin-bottom: 10px;
}

.ticket-file-fullscreen-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-file-fullscreen-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 12px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.ticket-file-fullscreen-body iframe,
.ticket-file-fullscreen-body video,
.ticket-file-fullscreen-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

.ticket-file-fullscreen-body img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    touch-action: none;
}

.pdf-viewer-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #525659;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.pdf-viewer-container canvas.pdf-page {
    display: block;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* =============================================
   ORDENES DE TRABAJO â€” Menu (cards resumen)
   ============================================= */

.ot-loading {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 13px;
    margin: 20px 0 8px;
}

.ot-section {
    margin-top: 24px;
}

.ot-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.ot-section-header i {
    color: #ea342c;
    font-size: 18px;
}

.ot-badge {
    background: #ea342c;
    color: white;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
}

.ot-card {
    background: white;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-left: 4px solid #d1d5db;
    transition: box-shadow 0.2s;
}

.ot-card--pendiente {
    border-left-color: #f59e0b;
}

.ot-card--en-proceso {
    border-left-color: #10b981;
}

.ot-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ot-card-tipo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    color: #111827;
}

.ot-card-tipo i {
    color: #ea342c;
    font-size: 16px;
}

.ot-prioridad-badge {
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ot-tiempo-badge {
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ot-tiempo--atiempo {
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
}

.ot-tiempo--retraso {
    background: rgba(245, 158, 11, 0.25);
    color: #b45309;
}

.ot-tiempo--caducado {
    background: rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.ot-tiempo--caducado-retraso {
    background: rgba(239, 68, 68, 0.35);
    color: #7f1d1d;
}

.ot-tiempo--sin-fecha {
    background: rgba(107, 114, 128, 0.18);
    color: #4b5563;
}

.ot-prioridad--alta {
    background: #fee2e2;
    color: #dc2626;
}

.ot-prioridad--media {
    background: #fef3c7;
    color: #d97706;
}

.ot-prioridad--baja {
    background: #e0f2fe;
    color: #0284c7;
}

.ot-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.ot-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
}

.ot-info-row i {
    color: #9ca3af;
    font-size: 13px;
    flex-shrink: 0;
}

.ot-info-green i {
    color: #10b981;
}

.ot-estado-dot {
    font-size: 8px !important;
}

.ot-estado--pendiente {
    color: #f59e0b;
}

.ot-estado--proceso {
    color: #2563eb;
}

.ot-estado--finalizado {
    color: #10b981;
}

.ot-estado--cerrado {
    color: #0ea5e9;
}

.ot-estado--anulado {
    color: #6b7280;
}

.ot-estado--otro {
    color: #6b7280;
}

.ot-card-actions {
    display: flex;
    justify-content: flex-end;
}

.ot-btn-detalle {
    background: linear-gradient(135deg, #ea342c, #c82d1d);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(234, 52, 44, 0.3);
}

/* =============================================
   ORDENES DE TRABAJO â€” PÃ¡gina Detalle
   ============================================= */

.ot-detalle-screen {
    min-height: 100%;
    background: #f5f5f5;
    padding-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ot-detalle-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ot-back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #111827;
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
}

.ot-detalle-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ot-detalle-loading,
.ot-detalle-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 15px;
}

.ot-detalle-empty i {
    font-size: 40px;
}

.ot-detalle-card {
    background: white;
    margin: 16px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.ot-detalle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ot-detalle-tipo {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.ot-detalle-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.5;
}

.ot-detalle-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.ot-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ot-field--full {
    grid-column: 1 / -1;
}

.ot-field-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ot-field-value {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.ot-detalle-estado-section {
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ot-estado-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ot-estado-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.ot-estado-chip {
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    padding: 4px 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ot-estado-chip--pendiente {
    background: #fef3c7;
    color: #d97706;
}

.ot-estado-chip--proceso {
    background: #dbeafe;
    color: #1d4ed8;
}

.ot-estado-chip--finalizada {
    background: #d1fae5;
    color: #059669;
}

.ot-timestamp {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ot-detalle-actions {
    margin: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ot-action-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ot-action-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ot-action-btn--arrancar {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.35);
}

.ot-action-btn--finalizar {
    background: linear-gradient(135deg, #ea342c, #c82d1d);
    color: white;
    box-shadow: 0 8px 18px rgba(234, 52, 44, 0.35);
}

/* =============================================
   CARD RESUMEN OT EN MENÃš
   ============================================= */
.ot-resumen-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(234, 52, 44, 0.12), rgba(234, 52, 44, 0.05));
    border: 1px solid rgba(234, 52, 44, 0.3);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 20px 0 8px 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ot-resumen-card--alert {
    animation: otPulse 1.6s ease-in-out infinite;
    border-color: rgba(234, 52, 44, 0.65);
}

.ot-resumen-card:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, rgba(234, 52, 44, 0.18), rgba(234, 52, 44, 0.08));
}

.ot-resumen-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(234, 52, 44, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ea342c;
    flex-shrink: 0;
}

.ot-resumen-info {
    flex: 1;
}

.ot-resumen-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.ot-resumen-note {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.ot-resumen-counts {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ot-resumen-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ot-resumen-pill--pendiente {
    background: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

.ot-resumen-pill--activo {
    background: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}

.ot-resumen-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ea342c;
    color: white;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(234, 52, 44, 0.45);
}

@media (max-width: 640px) {
    .menu-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ot-resumen-card {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .ot-resumen-info {
        flex: 1 1 100%;
        min-width: 0;
    }

    .ot-resumen-counts {
        flex-direction: row;
        align-items: center;
    }
}

@keyframes otPulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    }
    50% {
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    }
}

/* =============================================
   PÃGINA LISTA OT PENDIENTES (otp-*)
   ============================================= */
.otp-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 16px 0 16px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.otp-search i {
    color: #9ca3af;
    font-size: 14px;
}

.otp-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #111827;
    background: transparent;
}

.otp-search-input::placeholder {
    color: #9ca3af;
}

.otp-empty-state {
    margin: 0 16px;
    padding: 30px 20px;
}

.otp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px 32px 16px;
}

.otp-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    border-left: 4px solid #e5e7eb;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s, transform 0.12s;
    -webkit-tap-highlight-color: transparent;
}

.otp-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.otp-card.otp-card--pendiente {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.otp-card.otp-card--activo {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.otp-card.otp-card--finalizado {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.otp-card.otp-card--cerrado {
    border-left-color: #0ea5e9;
    background: #ecfeff;
}

.otp-card.otp-card--anulado {
    border-left-color: #6b7280;
    background: #f3f4f6;
}

.otp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.otp-card-id {
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
}


.otp-info-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 5px;
}

.otp-timer strong {
    color: #111827;
}

.otp-info-row i {
    color: #9ca3af;
    font-size: 13px;
}

.otp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.otd-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.otd-timer i {
    font-size: 14px;
}

.otp-ver-detalle {
    font-size: 13px;
    font-weight: 600;
    color: #ea342c;
}

.otp-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.otp-ver-publicaciones {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ot-publicacion-tipo {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* =============================================
   MODAL DETALLE OT (otd-*)
   ============================================= */
.otd-modal {
    background: #ffffff;
}

.otd-modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    gap: 12px;
}

.otd-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.otd-actions--top {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    flex: 0 0 auto;
}

.otd-loading,
.otd-empty {
    text-align: center;
    padding: 32px 0;
    color: #6b7280;
    font-size: 14px;
}

.otd-loading .spinner-border,
.otd-empty i {
    display: block;
    margin: 0 auto 10px auto;
    font-size: 32px;
}

.otd-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    flex: 0 0 auto;
}

.otd-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.otd-list-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    flex: 0 0 auto;
}

.otd-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f3f4f6;
}

.otd-list-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.otd-list-body {
    display: flex;
    flex-direction: column;
}

.otd-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.otd-field--full {
    grid-column: 1 / -1;
}

.otd-field-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.otd-field-value {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

/* AcordeÃ³n */
.otd-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.otd-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.otd-accordion-header:active {
    background: #e5e7eb;
}

.otd-accordion--open .otd-accordion-header {
    border-bottom: 1px solid #e5e7eb;
}

.otd-accordion-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.otd-accordion-chevron {
    font-size: 13px;
    color: #6b7280;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.otd-accordion-body {
    max-height: clamp(180px, 34vh, 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.otd-group-count {
    background: rgba(234, 52, 44, 0.12);
    color: #ea342c;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.otd-group-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.otd-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #f3f4f6;
}

.otd-list-item:last-child {
    border-bottom: none;
}

.otd-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea342c, #c82d1d);
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.otd-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.otd-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.otd-item-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.otd-actions {
    padding-top: 4px;
}

.otd-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.otd-tab-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.otd-tab-btn.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.otc-filtros {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.otc-filtro-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.otc-filtro-item label {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}

.otc-filtro-item--btn {
    align-items: flex-start;
}

.otc-alert {
    margin: 0;
}

.otc-tabla-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.otc-tabla {
    margin: 0;
}

.otc-tabla th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.otc-tabla tbody tr {
    cursor: pointer;
}

.otc-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
}

.otc-badge--cerrado {
    background: #dcfce7;
    color: #166534;
}

.otc-badge--finalizado {
    background: #fef3c7;
    color: #92400e;
}

.otc-badge--activo {
    background: #fee2e2;
    color: #991b1b;
}

.otc-badge--pendiente {
    background: #e0f2fe;
    color: #0c4a6e;
}

.otc-badge--anulado {
    background: #e5e7eb;
    color: #374151;
}

.otc-badge--default {
    background: #f1f5f9;
    color: #334155;
}

@media (max-width: 640px) {
    .otd-scroll {
        padding: 12px 14px 14px;
        gap: 12px;
    }

    .otd-fields {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .otd-list-title {
        font-size: 12px;
    }

    .otc-filtros {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   iOS / MOBILE: Correcciones de desbordamiento
   ============================================= */

/* ===================================================================
   TICKETS: Clases custom que reemplazan Bootstrap (sin dependencia)
   =================================================================== */

/* Buttons */
.tk-btn-primary {
    background: #2563eb; color: white; border: none; border-radius: 10px;
    padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s;
}
.tk-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.tk-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.tk-btn-secondary {
    background: #6b7280; color: white; border: none; border-radius: 10px;
    padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s;
}
.tk-btn-secondary:hover:not(:disabled) { background: #4b5563; }
.tk-btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.tk-btn-danger {
    background: #ea342c; color: white; border: none; border-radius: 10px;
    padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s;
}
.tk-btn-danger:hover:not(:disabled) { background: #c82d1d; }
.tk-btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

.tk-btn-outline-danger {
    background: transparent; color: #ea342c; border: 1px solid #fca5a5;
    border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s;
}
.tk-btn-outline-danger:hover:not(:disabled) { background: #fff1f2; border-color: #ea342c; }
.tk-btn-outline-danger:disabled { opacity: 0.6; cursor: not-allowed; }

.tk-btn-outline-secondary {
    background: transparent; color: #6b7280; border: 1px solid #d1d5db;
    border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s;
}
.tk-btn-outline-secondary:hover:not(:disabled) { background: #f3f4f6; border-color: #9ca3af; }
.tk-btn-outline-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.tk-btn-outline-primary {
    background: transparent; color: #2563eb; border: 1px solid #bfdbfe;
    border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s;
}
.tk-btn-outline-primary:hover:not(:disabled) { background: #eff6ff; border-color: #2563eb; }
.tk-btn-outline-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.tk-btn-outline-success {
    background: transparent; color: #059669; border: 1px solid #6ee7b7;
    border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s;
}
.tk-btn-outline-success:hover:not(:disabled) { background: #ecfdf5; border-color: #059669; }

/* Close button (reemplaza .btn-close) */
.tk-btn-close {
    background: none; border: none; cursor: pointer;
    width: 28px; height: 28px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #6b7280; font-size: 16px; transition: all 0.15s; padding: 0; line-height: 1;
}
.tk-btn-close:hover { background: #f3f4f6; color: #111827; }

/* Inputs */
.tk-input {
    width: 100%; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 8px 12px; font-size: 14px; color: #111827; outline: none;
    background: #fff; transition: border-color 0.15s; box-sizing: border-box;
}
.tk-input:focus { border-color: #ea342c; box-shadow: 0 0 0 3px rgba(234,52,44,0.1); }

.tk-input-sm {
    width: 100%; border: 1px solid #d1d5db; border-radius: 8px;
    padding: 5px 8px; font-size: 13px; color: #111827; outline: none;
    background: #fff; box-sizing: border-box;
}
.tk-input-sm:focus { border-color: #ea342c; }

.tk-textarea {
    width: 100%; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 10px 12px; font-size: 14px; color: #111827; outline: none;
    background: #fff; resize: vertical; transition: border-color 0.15s; box-sizing: border-box;
}
.tk-textarea:focus { border-color: #ea342c; box-shadow: 0 0 0 3px rgba(234,52,44,0.1); }

.tk-select {
    width: 100%; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 8px 12px; font-size: 14px; color: #111827; outline: none;
    background: #fff; cursor: pointer; box-sizing: border-box;
}
.tk-select:focus { border-color: #ea342c; }

/* Label */
.tk-label { font-size: 13px; font-weight: 600; color: #374151; display: block; margin-bottom: 5px; }
.tk-label--required::after { content: " *"; color: #ef4444; }
.tk-error { color: #ef4444; font-size: 12px; margin-top: 4px; display: block; }

/* Radio group */
.tk-radio-group { display: flex; gap: 20px; align-items: center; }
.tk-radio-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #374151; cursor: pointer; }
.tk-radio-label input[type="radio"] { width: 16px; height: 16px; accent-color: #ea342c; cursor: pointer; }

/* Spinners */
.tk-spinner {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid #fecaca; border-top-color: #ea342c;
    animation: sim-spin 0.8s linear infinite;
    display: block; margin: 0 auto 10px;
}
.tk-spinner-sm {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35); border-top-color: currentColor;
    animation: sim-spin 0.8s linear infinite;
    display: inline-block; vertical-align: middle;
}

/* Alerts */
.tk-alert-warning {
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
    border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
}
.tk-alert-danger {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
}

/* Table */
.tk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-table th {
    background: #f8fafc; color: #475569; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.02em;
    padding: 8px 10px; text-align: left; border-bottom: 1px solid #e5e7eb;
}
.tk-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; }
.tk-table tbody tr:hover td { background: #fef2f2; cursor: pointer; }
.tk-table tbody tr:last-child td { border-bottom: none; }
.tk-col-right { text-align: right; }

/* Card */
.tk-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06); overflow: hidden; margin-bottom: 20px;
}
.tk-card-header {
    padding: 14px 20px; border-bottom: 1px solid #e5e7eb;
    background: #1d4ed8; color: white;
}
.tk-card-header h4 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tk-card-body { padding: 20px; }

/* Form page layout */
.tk-form-page { padding: 20px 16px 60px; max-width: 800px; margin: 0 auto; }
.tk-form-section { margin-bottom: 20px; }
.tk-form-section h5 { font-size: 15px; font-weight: 700; color: #111827; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.tk-form-row { display: grid; gap: 14px; margin-bottom: 16px; }
@media (min-width: 640px) {
    .tk-form-row--2 { grid-template-columns: 1fr 1fr; }
    .tk-form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}
.tk-form-field { display: flex; flex-direction: column; gap: 5px; }
.tk-form-hr { border: none; border-top: 1px solid #e5e7eb; margin: 20px 0; }
.tk-form-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.tk-form-back { margin-bottom: 14px; }
.tk-loading-center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 12px; color: #6b7280; font-size: 14px; }

/* Priority selector */
.tk-priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.tk-priority-card {
    background: #fff; border: 2px solid #e5e7eb; border-radius: 14px;
    padding: 14px 10px; text-align: center; cursor: pointer; transition: all 0.15s;
}
.tk-priority-card:hover { border-color: #d1d5db; }
.tk-priority-card--selected-alta { border-color: #ea342c; box-shadow: 0 4px 12px rgba(234,52,44,0.2); }
.tk-priority-card--selected-media { border-color: #f59e0b; box-shadow: 0 4px 12px rgba(245,158,11,0.2); }
.tk-priority-card--selected-baja { border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,0.2); }
.tk-priority-card i { display: block; font-size: 26px; margin-bottom: 6px; }
.tk-priority-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.tk-priority-desc { font-size: 11px; color: #6b7280; }

/* Tablero selector */
.tk-tablero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .tk-tablero-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tk-tablero-grid { grid-template-columns: repeat(4, 1fr); } }
.tk-tablero-btn {
    width: 100%; border: 2px solid #e5e7eb; border-radius: 12px;
    padding: 12px 8px; background: #fff; cursor: pointer; text-align: center;
    font-size: 12px; font-weight: 600; color: #374151; transition: all 0.15s;
}
.tk-tablero-btn:hover { border-color: #ea342c; color: #ea342c; }
.tk-tablero-btn--selected { border-color: #ea342c; background: #fef2f2; color: #ea342c; }

/* List group */
.tk-list-group { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; max-height: 220px; overflow-y: auto; }
.tk-list-item {
    width: 100%; text-align: left; padding: 10px 14px; background: #fff;
    border: none; border-bottom: 1px solid #f3f4f6; cursor: pointer;
    transition: background 0.1s; display: block;
}
.tk-list-item:hover { background: #fef2f2; }
.tk-list-item:last-child { border-bottom: none; }

/* Adjunto badge */
.tk-badge-gray {
    display: inline-flex; align-items: center; gap: 4px;
    background: #e5e7eb; color: #374151; border-radius: 999px;
    padding: 3px 8px; font-size: 11px; font-weight: 600;
}
.tk-badge-remove {
    background: none; border: none; cursor: pointer; color: #6b7280;
    padding: 0 1px; font-size: 10px; line-height: 1; display: inline-flex; align-items: center;
}
.tk-badge-remove:hover { color: #111827; }

/* Selected item row */
.tk-selected-row {
    display: flex; align-items: center; justify-content: space-between;
    border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px;
    background: #fef2f2; gap: 10px;
}

/* MÃ³dulo detalle modal (reemplaza .modal.fade.show.d-block de Bootstrap) */
.tk-modulo-backdrop {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    display: flex; justify-content: center; align-items: center;
    padding: 20px; z-index: 9999; overscroll-behavior: contain;
}
.tk-modulo-modal {
    background: #fff; width: min(480px, 100%); border-radius: 18px;
    box-shadow: 0 20px 40px rgba(15,23,42,0.2); overflow: hidden;
}
.tk-modulo-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid #e5e7eb;
}
.tk-modulo-header h5 { font-size: 15px; font-weight: 700; color: #111827; margin: 0; }
.tk-modulo-body { padding: 14px 18px 18px; max-height: 70vh; overflow-y: auto; }
.tk-modulo-row { margin-bottom: 8px; font-size: 14px; color: #374151; }

/* Action form inside OT modal */
.tk-action-field { margin-bottom: 12px; }
.tk-action-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }

/* ================================================================
   DARK MODE — clases propias de Tickets/Actas/OT.
   Scoped a `html.dark .tickets-wrapper`: gana sobre el base claro,
   no afecta a SIM ni al modo claro. Rojo de marca #ea342c intacto.
   ================================================================ */

/* Fondos de pantalla */
html.dark .tickets-wrapper .tickets-screen,
html.dark .tickets-wrapper .actas-screen,
html.dark .tickets-wrapper .card-grid-screen,
html.dark .tickets-wrapper .ot-detalle-screen { background: #0e1726; }

/* Superficies tipo tarjeta */
html.dark .tickets-wrapper .ticket-card,
html.dark .tickets-wrapper .acta-card,
html.dark .tickets-wrapper .publicacion-card,
html.dark .tickets-wrapper .card-grid-item,
html.dark .tickets-wrapper .ot-card,
html.dark .tickets-wrapper .otp-card,
html.dark .tickets-wrapper .ot-detalle-card,
html.dark .tickets-wrapper .ticket-modal,
html.dark .tickets-wrapper .ticket-publication-card,
html.dark .tickets-wrapper .otd-modal,
html.dark .tickets-wrapper .otd-list-section,
html.dark .tickets-wrapper .otd-accordion,
html.dark .tickets-wrapper .tk-card,
html.dark .tickets-wrapper .tk-modulo-modal {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

/* Superficies tenues (formularios, archivos, headers de sección) */
html.dark .tickets-wrapper .ticket-publication-form,
html.dark .tickets-wrapper .ticket-file,
html.dark .tickets-wrapper .otd-section,
html.dark .tickets-wrapper .otd-list-header,
html.dark .tickets-wrapper .otd-accordion-header,
html.dark .tickets-wrapper .acta-propuesta,
html.dark .tickets-wrapper .otc-tabla-wrap {
    background: #111827;
    border-color: #374151;
    color: #cbd5e1;
}

/* Barras de búsqueda, selects custom y topbar de detalle OT */
html.dark .tickets-wrapper .tickets-search,
html.dark .tickets-wrapper .actas-search,
html.dark .tickets-wrapper .otp-search,
html.dark .tickets-wrapper .ticket-status-select,
html.dark .tickets-wrapper .ot-detalle-topbar {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}
html.dark .tickets-wrapper .tickets-search input,
html.dark .tickets-wrapper .actas-search input,
html.dark .tickets-wrapper .otp-search-input { background: transparent !important; color: #e5e7eb; }

/* Títulos / texto principal */
html.dark .tickets-wrapper .card-grid-title,
html.dark .tickets-wrapper .tickets-header h1,
html.dark .tickets-wrapper .actas-header h1,
html.dark .tickets-wrapper .ticket-title,
html.dark .tickets-wrapper .acta-module,
html.dark .tickets-wrapper .publicacion-author,
html.dark .tickets-wrapper .ticket-publication-author,
html.dark .tickets-wrapper .ticket-modal-header h2,
html.dark .tickets-wrapper .ot-detalle-tipo,
html.dark .tickets-wrapper .ot-field-value,
html.dark .tickets-wrapper .otd-field-value,
html.dark .tickets-wrapper .otd-item-title,
html.dark .tickets-wrapper .ot-card-tipo,
html.dark .tickets-wrapper .otd-list-title,
html.dark .tickets-wrapper .ot-detalle-title,
html.dark .tickets-wrapper .tk-card-header h4 { color: #f3f4f6; }

/* Texto secundario / muted */
html.dark .tickets-wrapper .tickets-header p,
html.dark .tickets-wrapper .actas-header p,
html.dark .tickets-wrapper .ticket-meta-line,
html.dark .tickets-wrapper .ticket-info,
html.dark .tickets-wrapper .ticket-footer,
html.dark .tickets-wrapper .tickets-state,
html.dark .tickets-wrapper .actas-state,
html.dark .tickets-wrapper .acta-author,
html.dark .tickets-wrapper .acta-description,
html.dark .tickets-wrapper .acta-meta,
html.dark .tickets-wrapper .publicacion-date,
html.dark .tickets-wrapper .publicacion-body,
html.dark .tickets-wrapper .ticket-publication-body,
html.dark .tickets-wrapper .ticket-modal-header p,
html.dark .tickets-wrapper .ot-detalle-desc,
html.dark .tickets-wrapper .ot-info-row,
html.dark .tickets-wrapper .otd-field-label,
html.dark .tickets-wrapper .ot-field-label,
html.dark .tickets-wrapper .otp-info-row,
html.dark .tickets-wrapper .otd-item-sub { color: #cbd5e1; }

/* Tabs */
html.dark .tickets-wrapper .tickets-tab-btn,
html.dark .tickets-wrapper .actas-tab-btn,
html.dark .tickets-wrapper .otd-tab-btn,
html.dark .tickets-wrapper .tk-tablero-btn {
    background: #1f2937;
    color: #cbd5e1;
    border-color: #374151;
}
html.dark .tickets-wrapper .tickets-main-tabs .nav-link { color: #9ca3af; }

/* Bordes sueltos */
html.dark .tickets-wrapper .ticket-card-header,
html.dark .tickets-wrapper .otp-card-footer,
html.dark .tickets-wrapper .ot-detalle-estado-section { border-color: #374151; }

/* ================================================================
   SHELL TICKETS — Topbar + Sidebar (drawer).
   Comportamiento IGUAL a SIM: el topbar SIEMPRE queda por encima
   del sidebar (no lo cubre). El sidebar se desliza POR DEBAJO del
   topbar (top:56px). Clases propias `tk-*` (no acopla con SIM).
   Topbar y sidebar viven dentro del MISMO contenedor fixed en
   TicketsLayout → comparten stacking context y los z-index aplican.
   El topbar es theme-aware (claro/oscuro) como el de SIM.
   ================================================================ */

/* Topbar — theme-aware (blanco en claro, gris-800 en oscuro, como SIM) */
.tk-topbar {
    position: relative;   /* participa en el stacking del contenedor */
    z-index: 50;          /* SIEMPRE encima del sidebar (SIM: topbar > sidebar) */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 56px;
    padding: 0 8px;
    background: #ffffff;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
html.dark .tk-topbar {
    background: #1f2937;
    color: #e5e7eb;
    border-bottom-color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.tk-topbar-group { display: flex; align-items: center; gap: 2px; }
.tk-topbar-btn {
    background: none; border: none; color: inherit; cursor: pointer;
    width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; line-height: 1; transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.tk-topbar-btn:active { background: rgba(0, 0, 0, 0.06); }
html.dark .tk-topbar-btn:active { background: rgba(255, 255, 255, 0.12); }
.tk-topbar-logo { height: 26px; object-fit: contain; cursor: pointer; }

/* Toggle de modo — MISMOS iconos luna/sol que SIM (mostrar/ocultar por html.dark) */
.tk-icon-light { display: block; width: 20px; height: 20px; }
.tk-icon-dark  { display: none;  width: 20px; height: 20px; }
html.dark .tk-icon-light { display: none; }
html.dark .tk-icon-dark  { display: block; }

/* Dropdown de usuario (Cambiar App / Cerrar Sesión) — como SIM */
.tk-topbar-menu { position: relative; }
.tk-topbar-backdrop { position: fixed; inset: 0; z-index: 55; }
.tk-topbar-dropdown {
    position: absolute; top: 100%; right: 0; min-width: 184px;
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); overflow: hidden; z-index: 60;
}
html.dark .tk-topbar-dropdown { background: #1f2937; border-color: #374151; }
.tk-dropdown-item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 11px 14px; background: none; border: none; cursor: pointer;
    font-size: 14px; color: #374151; text-align: left; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.tk-dropdown-item i { font-size: 17px; }
.tk-dropdown-item:hover { background: #f3f4f6; }
html.dark .tk-dropdown-item { color: #e5e7eb; }
html.dark .tk-dropdown-item:hover { background: rgba(255, 255, 255, 0.06); }
.tk-dropdown-item.tk-danger { color: #dc2626; }
html.dark .tk-dropdown-item.tk-danger { color: #f87171; }
.tk-dropdown-divider { height: 1px; background: #e5e7eb; }
html.dark .tk-dropdown-divider { background: #374151; }

/* Overlay del drawer (fade) — empieza DEBAJO del topbar */
.tk-sidebar-overlay {
    position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 40;
}
.tk-sidebar-overlay.tk-open { opacity: 1; visibility: visible; }

/* Drawer lateral (slide-in) — empieza DEBAJO del topbar (top:56px) */
.tk-sidebar {
    position: fixed; top: 56px; left: 0; bottom: 0;
    width: min(280px, 82vw);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 45;
    display: flex; flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.tk-sidebar.tk-open { transform: translateX(0); }
html.dark .tk-sidebar { background: #1f2937; color: #e5e7eb; }

/* Sin header: el sidebar abre con la hamburguesa y cierra tocando el overlay */
.tk-sidebar-nav { display: flex; flex-direction: column; padding: 12px 8px; gap: 2px; }
.tk-sidebar-section {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: #9ca3af; padding: 12px 12px 6px;
}
.tk-sidebar-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; text-align: left;
    padding: 11px 12px; border: none; background: none;
    border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: #374151;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.tk-sidebar-item i { font-size: 18px; color: #ea342c; width: 22px; text-align: center; }
.tk-sidebar-item:hover,
.tk-sidebar-item.tk-active { background: #fef2f2; color: #ea342c; }
html.dark .tk-sidebar-item { color: #cbd5e1; }
html.dark .tk-sidebar-item:hover,
html.dark .tk-sidebar-item.tk-active { background: rgba(234, 52, 44, 0.14); color: #f87171; }
html.dark .tk-sidebar-item:hover i,
html.dark .tk-sidebar-item.tk-active i { color: #f87171; }

.tk-sidebar-divider { height: 1px; background: #e5e7eb; margin: 8px 12px; }
html.dark .tk-sidebar-divider { background: #374151; }

/* ================================================================
   LOADING OVERLAY — animación de pan Maxipan (componente LoadingOverlay.razor).
   Copiado de AppMaxipan (LoadingOverlay.razor.css) a CSS global.
   ================================================================ */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    background: rgba(17, 17, 17, 0.75);
}
.loader-wrapper { text-align: center; }
.loader {
    position: relative;
    width: 180px;
    height: 180px;
    transform: translateZ(0);
}
.nut {
    position: absolute;
    inset: 0;
    background: #c62828;
    will-change: transform;
    backface-visibility: hidden;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: loader-spin 3s linear infinite;
}
.nut::after {
    content: "";
    position: absolute;
    inset: 38%;
    background: #111;
    border-radius: 50%;
}
.bread {
    position: absolute;
    inset: 35px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bread svg { width: 100%; height: auto; transform: translateZ(0); }
.steam {
    position: absolute;
    top: 25px;
    left: 50%;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    transform: translateX(-50%);
    will-change: transform, opacity;
    backface-visibility: hidden;
    animation: loader-steam 2.6s linear infinite;
    z-index: 3;
}
.steam:nth-of-type(2) { left: 45%; animation-delay: 0.9s; }
.steam:nth-of-type(3) { left: 55%; animation-delay: 1.8s; }
.loader-text {
    margin-top: 18px;
    font-family: system-ui, sans-serif;
    color: #fff;
    letter-spacing: 0.06em;
}
@keyframes loader-spin { to { transform: rotate(360deg) translateZ(0); } }
@keyframes loader-steam {
    0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -45px) scale(1.5); }
}

/* ================================================================
   CREAR TICKET — selector de Tablero y prioridad.
   Las clases `tablero-btn`/`activo` no estaban definidas → no se
   notaba la selección (claro) ni se veía el texto (oscuro).
   ================================================================ */

/* Botón de tablero (claro) */
.tickets-wrapper .tablero-btn {
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 12px;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.tickets-wrapper .tablero-btn small { display: block; font-size: 11px; color: #9ca3af; font-weight: 500; }
.tickets-wrapper .tablero-btn:hover { border-color: #fca5a5; }
.tickets-wrapper .tablero-btn.activo {
    border-color: #ea342c;
    background: #fef2f2;
    color: #ea342c;
    box-shadow: 0 4px 12px rgba(234, 52, 44, 0.20);
}
.tickets-wrapper .tablero-btn.activo small { color: #ea342c; }

/* Botón de tablero (oscuro) */
html.dark .tickets-wrapper .tablero-btn {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}
html.dark .tickets-wrapper .tablero-btn small { color: #9ca3af; }
html.dark .tickets-wrapper .tablero-btn:hover { border-color: #f87171; }
html.dark .tickets-wrapper .tablero-btn.activo {
    border-color: #f87171;
    background: rgba(234, 52, 44, 0.18);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
html.dark .tickets-wrapper .tablero-btn.activo small { color: #fca5a5; }

/* Texto del nombre del tablero — escala en pantallas pequeñas para evitar corte de palabras */
.tickets-wrapper .tablero-btn > div {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(10px, 3vw, 13px);
    line-height: 1.2;
}

/* Borde de color diferenciado por país */
.tickets-wrapper .tablero-btn.tablero-btn-ecuador {
    border-left: 4px solid #d97706;
}
.tickets-wrapper .tablero-btn.tablero-btn-ecuador.activo {
    border-left-color: #b45309;
}
.tickets-wrapper .tablero-btn.tablero-btn-panama {
    border-left: 4px solid #2563eb;
}
.tickets-wrapper .tablero-btn.tablero-btn-panama.activo {
    border-left-color: #1d4ed8;
}
html.dark .tickets-wrapper .tablero-btn.tablero-btn-ecuador { border-left-color: #fbbf24; }
html.dark .tickets-wrapper .tablero-btn.tablero-btn-panama  { border-left-color: #60a5fa; }

/* Tarjetas de prioridad seleccionadas — tinte de fondo para que se note la selección */
.tickets-wrapper .card.border-danger.border-2  { background: #fff5f5; }
.tickets-wrapper .card.border-warning.border-2 { background: #fffbeb; }
.tickets-wrapper .card.border-primary.border-2 { background: #eff6ff; }
html.dark .tickets-wrapper .card.border-danger.border-2  { background: rgba(239, 68, 68, 0.14) !important; }
html.dark .tickets-wrapper .card.border-warning.border-2 { background: rgba(245, 158, 11, 0.16) !important; }
html.dark .tickets-wrapper .card.border-primary.border-2 { background: rgba(59, 130, 246, 0.16) !important; }

/* En las tarjetas de prioridad, el texto muted "Atención..." legible en oscuro */
html.dark .tickets-wrapper .card .card-text.text-muted { color: #cbd5e1 !important; }

/* ================================================================
   TICKET TOAST — aviso emergente de éxito / alerta / error.
   position:fixed fuera del flujo del layout, z-index sobre el modal.
   ================================================================ */

.ticket-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(-100% - 24px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    max-width: calc(100vw - 32px);
    z-index: 10500;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.30s cubic-bezier(0.34, 1.52, 0.64, 1),
        opacity   0.25s ease;
}

.ticket-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ticket-toast--exito  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.ticket-toast--alerta { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.ticket-toast--error  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

html.dark .ticket-toast--exito  { background: #052e16; color: #4ade80; border-color: #166534; }
html.dark .ticket-toast--alerta { background: #1c1200; color: #fbbf24; border-color: #78350f; }
html.dark .ticket-toast--error  { background: #1c0202; color: #f87171; border-color: #7f1d1d; }

