/* Variables CSS */
:root {
    --primary-color: #113469;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo-carousel {
    position: relative;
    width: 100%;
    height: 120px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Evita que las imágenes se salgan */
}

.logo-slide {
    position: absolute;
    max-width: 90%;
    /* Ajuste al ancho del contenedor */
    height: auto;
    max-height: 100px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    object-fit: contain;
    /* Mantiene la proporción */
}

.logo-slide.active {
    opacity: 1;
    transform: scale(1);
    position: relative;
    /* Asegura que no se apilen en modo gigante si falla el absolute */
}

/* Fix para navegadores sin CSS actualizado o caché */
.logo-carousel img:not(.active) {
    display: none;
}

.logo-carousel img.active {
    display: block;
    margin: 0 auto;
}

.login-footer {
    margin-top: 30px;
    /* Más espacio hacia abajo */
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.login-box h2 {
    color: var(--dark-color);
    margin-bottom: 30px;
    font-weight: 300;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-color);
    font-weight: 500;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 52, 105, 0.1);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    /* Default 100% for login */
    font-weight: 600;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-logout:hover,
.action-link:hover,
.btn-search:hover,
.btn-clear:hover,
.action-submit-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active,
.btn-secondary:active,
.btn-logout:active,
.action-link:active,
.btn-search:active,
.btn-clear:active,
.action-submit-compact:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #bdc3c7;
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    /* Asegurar transición */
}

/* Alert Styles */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.dashboard-header {
    background: var(--primary-color);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    font-size: 24px;
    font-weight: 300;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.role {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.dashboard-main {
    padding: 30px;
}

.dashboard-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-actions .btn-primary,
.dashboard-actions .btn-secondary {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.stats {
    display: flex;
    gap: 20px;
    font-weight: 500;
    color: var(--dark-color);
}

/* Table Styles */
.tickets-table-container {
    overflow-x: auto;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tickets-table th,
.tickets-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.tickets-table th {
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.tickets-table tr:hover {
    background: #f8f9fa;
}

/* Estado Styles */
.estado {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.estado.pendiente {
    background: #fff3cd;
    color: #856404;
}

.estado.en.proceso {
    background: #cce7ff;
    color: #004085;
}

.estado.realizado {
    background: #d4edda;
    color: #155724;
}

.estado.cerrado {
    background: #e2e3e5;
    color: #383d41;
}

/* Form Inline */
.form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 4px;
}

.pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tickets-table {
        font-size: 14px;
    }

    .form-inline {
        flex-direction: column;
    }
}

/* Agregar esto al final del archivo style.css existente */

/* Navbar Styles */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
}

.nav-logo {
    height: 30px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-welcome {
    font-size: 14px;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 150px;
    box-shadow: var(--box-shadow);
    border-radius: 4px;
    z-index: 1000;
}

.dropdown-content a {
    color: var(--dark-color);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:hover {
    background: var(--light-color);
}

.user-dropdown.active .dropdown-content {
    display: block;
}

/* Footer Styles */
.footer {
    background: var(--dark-color);
    color: white;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--light-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.server-info {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--light-color);
    padding: 15px 30px;
    border-bottom: 1px solid #ddd;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #7f8c8d;
}

.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 30px;
    min-height: calc(100vh - 160px);
}

/* Form Improvements */
.ticket-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .nav-links {
        margin: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* Estados mejorados */
.estado {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado.pendiente {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado.en.proceso {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.estado.realizado {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado.cerrado {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-welcome {
    font-size: 14px;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 150px;
    box-shadow: var(--box-shadow);
    border-radius: 4px;
    z-index: 1000;
}

.dropdown-content a {
    color: var(--dark-color);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:hover {
    background: var(--light-color);
}

.user-dropdown.active .dropdown-content {
    display: block;
}

/* Footer Styles */
.footer {
    background: var(--dark-color);
    color: white;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--light-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.server-info {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--light-color);
    padding: 15px 30px;
    border-bottom: 1px solid #ddd;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #7f8c8d;
}

.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 30px;
    min-height: calc(100vh - 160px);
}

/* Form Improvements */
.ticket-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .nav-links {
        margin: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* Estados mejorados */
.estado {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado.pendiente {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado.en.proceso {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.estado.realizado {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado.cerrado {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #333333;
    }

    .estado {
        border-width: 2px;
    }
}

/* Ticket Details & Comments */
.ticket-details {
    display: grid;
    gap: 30px;
}

.detail-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
}

.detail-card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 24px;
}

.detail-card .description {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.meta-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.comments-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
}

.comments-section h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 10px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.comment {
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
}

.comment.user {
    background: #f8f9fa;
    margin-right: 50px;
}

.comment.technician {
    background: #e8f4fd;
    margin-left: 50px;
    border-color: #b3d7ff;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.comment-body {
    color: var(--dark-color);
}

.add-comment {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
}

.add-comment h4 {
    margin-bottom: 15px;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* Dropdown Menu Styles */
.actions-cell {
    position: relative;
    width: 50px;
    text-align: center;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--secondary-color);
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 240px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    z-index: 1000;
    text-align: left;
    border: 1px solid #e1e8ed;
    padding: 8px 0;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-item .icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: #e1e8ed;
    margin: 8px 0;
}

/* Accordion Styles */
.accordion-toggle {
    justify-content: space-between;
}

.accordion-toggle::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s;
}

.accordion-toggle.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
}

.dropdown-form {
    padding: 15px;
}

.form-group-sm {
    margin-bottom: 10px;
}

.form-control-sm {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.btn-primary-sm {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}


.btn-primary-sm:hover {
    background: #0d2a52;
}

/* Accordion Styles for Dropdown */
.accordion-toggle {
    justify-content: space-between;
}

.accordion-toggle::after {
    content: '▼';
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.3s;
}

.accordion-toggle.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
}

/* Filters Container */
.filters-container {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
    margin-bottom: 25px;
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 52, 105, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-search,
.btn-clear {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-search:hover {
    width: 100%;
    padding: 10px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-item .icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: #e1e8ed;
    margin: 8px 0;
}

/* Accordion Styles */
.accordion-toggle {
    justify-content: space-between;
}

.accordion-toggle::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s;
}

.accordion-toggle.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
}

.dropdown-form {
    padding: 15px;
}

.form-group-sm {
    margin-bottom: 10px;
}

.form-control-sm {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.btn-primary-sm {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}


.btn-primary-sm:hover {
    background: #0d2a52;
}

/* Accordion Styles for Dropdown */
.accordion-toggle {
    justify-content: space-between;
}

.accordion-toggle::after {
    content: '▼';
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.3s;
}

.accordion-toggle.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
}

/* Filters Container */
.filters-container {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
    margin-bottom: 25px;
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 52, 105, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    transition: var(--transition);
}

.btn-search:hover {
    background: #0d2a52;
}

.btn-clear {
    background: #f8f9fa;
    color: var(--dark-color);
    border: 2px solid #e1e8ed;
    transition: var(--transition);
}

.btn-clear:hover {
    background: #e9ecef;
    border-color: #ddd;
}

/* ============================================
   IMPROVED TABLE LAYOUT FOR ADMIN/TECHNICIAN
   ============================================ */

/* Actions cell - more space for controls */
.actions-cell {
    min-width: 280px;
    width: auto;
    white-space: nowrap;
}

/* Simple actions container */
.actions-simple {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

/* Action link styling */
.action-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

.action-link:hover {
    background: #0d2a52;
}

/* Inline form for status update */
.action-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

/* Compact select with full text visible */
.action-select-compact {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    min-width: 140px;
    /* Ensure enough width for text */
    appearance: none;
    /* Remove default arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.action-select-compact:hover {
    border-color: var(--primary-color);
}

.action-select-compact:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 52, 105, 0.1);
}

/* Submit button for status update */
.action-submit-compact {
    padding: 8px 14px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-submit-compact:hover {
    background: #229954;
    transform: scale(1.05);
}

/* Improve table column widths */
.tickets-table th:nth-child(1),
/* ID */
.tickets-table td:nth-child(1) {
    width: 60px;
    text-align: center;
}

.tickets-table th:nth-child(2),
/* Título */
.tickets-table td:nth-child(2) {
    min-width: 180px;
    max-width: 250px;
}

.tickets-table th:nth-child(3),
/* Descripción */
.tickets-table td:nth-child(3) {
    min-width: 200px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* For admin/technician view with extra columns */
.tickets-table th:nth-child(4),
/* Usuario */
.tickets-table td:nth-child(4) {
    min-width: 120px;
}

.tickets-table th:nth-child(5),
/* Área */
.tickets-table td:nth-child(5) {
    min-width: 100px;
}

.tickets-table th:nth-child(6),
/* Estado */
.tickets-table td:nth-child(6) {
    min-width: 120px;
}

.tickets-table th:nth-child(7),
/* Prioridad */
.tickets-table td:nth-child(7) {
    min-width: 90px;
}

.tickets-table th:nth-child(8),
/* Fecha */
.tickets-table td:nth-child(8) {
    min-width: 130px;
    white-space: nowrap;
}

/* Ensure table container can scroll horizontally if needed */
.tickets-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Better table padding for more breathing room */
.tickets-table th,
.tickets-table td {
    padding: 15px 12px;
    vertical-align: middle;
}

/* Responsive adjustments - App Mode */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }

    .dashboard-header h1 {
        font-size: 20px;
    }

    .user-info {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .btn-logout {
        width: 100%;
        padding: 12px;
        text-align: center;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dashboard-actions .btn-primary,
    .dashboard-actions .btn-secondary {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }

    /* Transform Table to Cards on Mobile */
    .tickets-table,
    .tickets-table thead,
    .tickets-table tbody,
    .tickets-table th,
    .tickets-table td,
    .tickets-table tr {
        display: block;
    }

    .tickets-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .tickets-table tr {
        background: white;
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: 1px solid #eee;
        padding: 10px;
    }

    .tickets-table td {
        border: none;
        position: relative;
        padding-left: 45% !important;
        text-align: right !important;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .tickets-table td:before {
        position: absolute;
        left: 15px;
        width: 40%;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--primary-color);
        content: attr(data-label);
    }

    .actions-cell {
        padding-left: 10px !important;
        justify-content: center !important;
        border-top: 1px solid #eee !important;
        margin-top: 5px;
    }

    .actions-simple {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
    }

    .action-link {
        width: 100%;
        text-align: center;
        padding: 12px !important;
    }

    .action-select-compact {
        width: 100%;
    }

    .stats {
        justify-content: center;
        width: 100%;
    }
}

/* Evidencias y Adjuntos */
.attachment-preview {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.attachment-link {
    display: inline-block;
    text-decoration: none;
    color: var(--primary-color);
    margin-top: 10px;
}

.img-preview {
    display: block;
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 5px;
    border: 1px solid #ddd;
}

.comment-attachment {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.img-preview-small {
    display: block;
    max-width: 150px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-bottom: 5px;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #6c757d;
}

/* Estilos de Prioridad */
.prioridad-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.prioridad-baja {
    background-color: #d1fae5;
    color: #065f46;
}

.prioridad-media {
    background-color: #fef3c7;
    color: #92400e;
}

.prioridad-alta {
    background-color: #fee2e2;
    color: #991b1b;
}

.prioridad-critica {
    background-color: #7f1d1d;
    color: #ffffff;
}

/* Estilo de Fecha Reducido */
.fecha-creacion {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.col-fecha {
    min-width: 110px !important;
}