/* Ajustes compartidos para las vistas del sistema de tickets. */
@media (max-width: 1100px) {
    .tickets-navbar-content { flex-wrap: wrap; gap: .75rem; }
    .tickets-nav-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: .55rem .75rem;
        color: #fff;
        background: rgba(255,255,255,.16);
        border: 1px solid rgba(255,255,255,.35);
        border-radius: 8px;
        font-size: 1rem;
        cursor: pointer;
    }
    .tickets-nav-links {
        display: none !important;
        order: 3;
        flex: 0 0 100% !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .2rem !important;
    }
    .tickets-nav-links.is-open { display: flex !important; }
    .tickets-nav-links a { display: flex !important; padding: .7rem .8rem !important; }
    .tickets-user-menu { margin-left: 0; gap: .55rem !important; }
    .tickets-user-info { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 768px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .container, .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box;
    }
    .container[style], .container-fluid[style] { margin-top: 1rem !important; margin-bottom: 1.5rem !important; }
    .d-flex.justify-between.align-center { align-items: flex-start !important; flex-wrap: wrap; gap: .75rem; }
    .stats-card { margin-bottom: .75rem; }
    .row > .col, .row > [class^="col-"], .row > [class*=" col-"] {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        box-sizing: border-box;
    }
    .table-responsive, .table-container, .table-wrapper {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .container table, .container-fluid table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .container table th, .container table td,
    .container-fluid table th, .container-fluid table td { white-space: nowrap; }
    .card table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .form-row { flex-wrap: wrap; }
    .form-row > .form-group { min-width: 100% !important; }
    .ticket-form-section .row { display: flex; flex-wrap: wrap; }
    .ticket-form-section .row > [class*="col-"] { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
    .crear-ticket-container { margin: 1rem auto !important; padding: 0 .75rem !important; }
    .form-body { padding: 1.25rem !important; }
    .form-header { padding: 1.25rem !important; }
    .form-header h2 { font-size: 1.35rem !important; }
    .form-grid { grid-template-columns: minmax(0, 1fr) !important; gap: .75rem !important; }
    .form-control, input, select, textarea, button { max-width: 100%; box-sizing: border-box; }
    .modal-content { width: calc(100vw - 2rem) !important; max-width: 100% !important; margin: 1rem auto; }
    .ticket-detail-grid, .ticket-info-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .siigo-ticket-item { overflow-wrap: anywhere; }
    canvas { max-width: 100% !important; }
    .selector-container { padding: 1.5rem !important; }
    .role-options { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 480px) {
    .tickets-navbar { padding: .7rem .8rem !important; }
    .tickets-navbar-brand { gap: .5rem !important; }
    .tickets-navbar-brand h2 { font-size: 1rem !important; }
    .tickets-navbar-brand > i { font-size: 1.4rem !important; }
    .tickets-user-info { display: none; }
    .btn-logout { padding: .45rem .65rem !important; }
    .container, .container-fluid { padding-left: .75rem !important; padding-right: .75rem !important; }
    .row > .col, .row > [class^="col-"], .row > [class*=" col-"] {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .form-body { padding: 1rem !important; }
    .prioridad-group { gap: .5rem !important; }
    .prioridad-item { min-width: calc(50% - .5rem) !important; }
    .modal-actions { flex-wrap: wrap; }
    .modal-actions button, .modal-actions .btn { flex: 1 1 auto; }
}
