/* css/style.css */
* { 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;
}

/* Login */
.login-container {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; padding: 20px;
}
.login-box {
    background: white; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 50px; width: 100%; max-width: 450px;
}
.login-header { text-align: center; margin-bottom: 40px; }
.login-header h1 { color: #667eea; font-size: 32px; margin-bottom: 10px; }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 8px; color: #374151; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 14px 18px; border: 2px solid #e5e7eb;
    border-radius: 10px; font-size: 15px; transition: all 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.btn-login {
    width: 100%; padding: 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4); }
.error-message {
    background: #fee2e2; color: #dc2626; padding: 12px; border-radius: 8px;
    margin-bottom: 20px; text-align: center; display: none;
}

/* Dashboard */
.dashboard { display: none; min-height: 100vh; }
.navbar {
    background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0 30px; height: 70px; display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand h2 { color: #667eea; font-size: 24px; }
.user-info { display: flex; align-items: center; gap: 20px; }
.user-badge {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px;
    background: #f3f4f6; border-radius: 20px; font-size: 14px; color: #374151;
}
.user-role {
    padding: 4px 12px; background: #667eea; color: white;
    border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.btn-logout {
    padding: 10px 20px; background: #ef4444; color: white; border: none;
    border-radius: 8px; cursor: pointer; font-weight: 500;
}
.container { max-width: 1200px; margin: 0 auto; padding: 30px; }
.page-header { margin-bottom: 30px; }
.page-header h1 { color: white; font-size: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 25px; margin-bottom: 30px; }
.card { background: white; border-radius: 15px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 2px solid #f3f4f6; padding-bottom: 15px; }
.btn-primary {
    width: 100%; padding: 14px; background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); }

/* Tickets List */
.tickets-list { max-height: 500px; overflow-y: auto; }
.ticket-item {
    padding: 20px; background: #f9fafb; border-radius: 10px; margin-bottom: 15px;
    border-left: 4px solid #667eea; transition: transform 0.2s;
}
.ticket-item:hover { transform: translateX(5px); background: #f3f4f6; }
.ticket-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.ticket-title { font-weight: 600; color: #1f2937; font-size: 16px; }
.ticket-status { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-nuevo { background: #dbeafe; color: #1e40af; }
.status-revision { background: #fef3c7; color: #92400e; }
.status-progreso { background: #ddd6fe; color: #5b21b6; }
.status-pendiente { background: #fce7f3; color: #9d174d; }
.status-resuelto { background: #d1fae5; color: #065f46; }
.status-cerrado { background: #e5e7eb; color: #374151; }
.ticket-meta { display: flex; gap: 20px; font-size: 13px; color: #9ca3af; margin-top: 10px; }
.loading { text-align: center; padding: 20px; color: #6b7280; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 15px; display: none; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    color: #1f2937;
}

/* Ticket Detail */
.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
}

.ticket-info-grid div {
    font-size: 14px;
}

.ticket-actions {
    margin: 20px 0;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 10px;
}

.ticket-actions select {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f3f4f6;
}

.section h3 {
    margin-bottom: 15px;
    color: #374151;
}

.note-item {
    animation: slideIn 0.3s ease;
}

.note-internal {
    border-left-color: #f59e0b !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 5px;
    font-size: 24px;
    cursor: pointer;
}

.rating-stars span:hover {
    transform: scale(1.2);
}
