/* Estilos específicos para el dashboard */

/* Layout principal */
.dashboard-container {
    min-height: 100vh;
    background-color: #f9fafb;
}

/* Header */
.dashboard-header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.stat-number.open {
    color: #2563eb;
}

.stat-number.in-progress {
    color: #d97706;
}

.stat-number.resolved {
    color: #059669;
}

/* Layout de dos columnas */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

/* Panel de tickets */
.tickets-panel {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tickets-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tickets-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.new-ticket-btn {
    background-color: #2563eb;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-ticket-btn:hover {
    background-color: #1d4ed8;
}

/* Filtros */
.filters-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Lista de tickets */
.tickets-list {
    max-height: 24rem;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.ticket-item:hover {
    background-color: #f9fafb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.ticket-item.selected {
    background-color: #dbeafe;
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.ticket-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.4;
    flex: 1;
    margin-right: 0.5rem;
}

.ticket-status {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.ticket-description {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ticket-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-priority {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ticket-category {
    font-size: 0.75rem;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.ticket-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.ticket-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Panel de detalles */
.ticket-detail-panel {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    min-height: 24rem;
    display: flex;
    flex-direction: column;
}

.ticket-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 24rem;
    color: #6b7280;
}

.ticket-detail-icon {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.ticket-detail-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.5rem;
}

.ticket-detail-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Detalle del ticket */
.ticket-detail-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ticket-detail-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.ticket-detail-title-main {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.ticket-detail-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ticket-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.ticket-meta-label {
    color: #6b7280;
    font-weight: 500;
}

.ticket-meta-value {
    color: #111827;
}

.ticket-detail-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ticket-detail-responses {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    flex: 1;
}

.ticket-responses-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.ticket-responses-list {
    margin-bottom: 1rem;
}

.ticket-response-item {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.ticket-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ticket-response-author {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.ticket-response-time {
    color: #6b7280;
    font-size: 0.75rem;
}

.ticket-response-message {
    color: #374151;
    line-height: 1.5;
    font-size: 0.875rem;
}

.ticket-response-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ticket-response-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    resize: none;
    font-size: 0.875rem;
}

.ticket-response-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ticket-response-send {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-response-send:hover {
    background-color: #1d4ed8;
}

.ticket-response-options {
    margin: 0.5rem 0;
}

.ticket-response-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.ticket-response-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.ticket-response-checkbox span {
    user-select: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .tickets-panel {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tickets-header {
        padding: 1rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .ticket-item {
        padding: 0.75rem;
    }
}

/* Estados de tickets */
.status-open {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-in_progress {
    background-color: #fef3c7;
    color: #92400e;
}

.status-resolved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-closed {
    background-color: #f3f4f6;
    color: #374151;
}

/* Prioridades */
.priority-low {
    background-color: #f3f4f6;
    color: #374151;
}

.priority-medium {
    background-color: #dbeafe;
    color: #1e40af;
}

.priority-high {
    background-color: #fed7aa;
    color: #c2410c;
}

.priority-urgent {
    background-color: #fecaca;
    color: #dc2626;
}
